gm명령 메모리솔류션
저장하는명령어 아이템도가티
l1j\\server\\server\\command\\executor
L1Save.java
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package l1j.server.server.command.executor;
import java.util.logging.Logger;
import l1j.server.server.model.L1World;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SystemMessage;
public class L1Save implements L1CommandExecutor {
private static Logger _log = Logger.getLogger(L1Save.class.getName());
private L1Save() {
}
public static L1CommandExecutor getInstance() {
return new L1Save();
}
//@Override
public void execute(L1PcInstance pc, String cmdName, String arg) {
try{
for (L1PcInstance pc1 : L1World.getInstance().getAllPlayers())
{
pc1.save();
pc1.saveInventory();
pc1.sendPackets(new S_SystemMessage(\"귀하의 정보가보호 저장되엇습니다\"));
pc.sendPackets(new S_SystemMessage(\"서버의데이터 저장완료。\"));
System.out.println((new StringBuilder()).append(\"서버 정보 데이터베이스에 저장되어잇는 메모리~:\").append(
Runtime.getRuntime().freeMemory() / 1024 / 1024).append(\"MB\").toString());
}
}
catch (Exception e) {
}
}
else if (itemId == XXXXX){ <==아이템번호
try {
pc.save();
pc.saveInventory();
} catch (Exception e) { }
pc.sendPackets(new S_SystemMessage(\"메시지\"));
pc.getInventory().removeItem(l1iteminstance, 1);
}
}

김닉넴 님의 최근 댓글
클라는 있나요? 2023 04.29 클라 있나요? 2023 03.23 감사합니다 2016 06.06 ㄳ합니다 2016 06.05 ㄳ합니다 2016 06.05