Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.sf.l2j.gameserver.custom.usermenu.menuhandlers;
- import net.sf.l2j.gameserver.custom.events.mines.MinesManager;
- import net.sf.l2j.gameserver.custom.events.mines.Mines;
- import net.sf.l2j.gameserver.model.actor.instance.Player;
- import java.util.StringTokenizer;
- public class MinesEventHandler {
- public static MinesEventHandler getInstance()
- {
- return MinesEventHandler.SingletonHolder._instance;
- }
- public void parseCmd(String command, Player activeChar)
- {
- StringTokenizer st = new StringTokenizer(command, " ");
- if(activeChar.isGM())
- activeChar.sendMessage("[CMD]: "+command);
- if(command.startsWith("_menuMinesSelect")){
- String selected = "";
- String cmdContent = st.nextToken();
- int position = Integer.valueOf(st.nextToken());
- int chance = Integer.valueOf(st.nextToken());
- Mines newMine = MinesManager.getInstance().getMine(activeChar.getObjectId());
- if(chance > 50)
- newMine.soloRewards(activeChar);
- newMine.selectedBox(position);
- newMine.minesWindow(activeChar);
- }else if(command.startsWith("_menuShowMines")){
- }
- }
- private static class SingletonHolder
- {
- protected static final MinesEventHandler _instance = new MinesEventHandler();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement