【发布时间】:2014-04-12 19:06:17
【问题描述】:
好的,所以我想要它,所以如果玩家输入 ::help,RequestHelp.java 中的方法将运行,
Commandif (playerCommand.startsWith("help") && (c.playerRights >= 0)) {
c.sendMessage("A staff member has been contacted, please wait.");
(right here is where I want the method from the other class to run'
}
这是 RequestHelp.java 中的方法
public static void callForHelp(Client c) {
if (System.currentTimeMillis() - c.lastRequest < 30000) {
c.sendMessage("It has only been "+ getTimeLeft(c) +" seconds since your last request for help!");
c.sendMessage("Please only request help from the staff every 30 seconds!");
if (!requestingHelp) {
c.setSidebarInterface(3, 3213);
c.getPA().sendFrame106(3);
}
return;
}
requestingHelp = true;
otherPlayer = c.playerName;
c.lastRequest = System.currentTimeMillis();
setInterface(c);
PlayerHandler.messageAllStaff(Misc.optimizeText(getPlayer().playerName) +" needs help, their cords are: "+ playerCoords() +".", true);
}
【问题讨论】:
-
问题是什么?