コード例 #1
0
 @Override
 public String OnExecute(IPlayer executor, IArgumentList parameters) {
   if (core.isEnabled())
     return Constants.MSG_COLOR + "Only use this command when headhunters is disabled!";
   equipmentRepository.setEquipment(executor.getInventory());
   equipmentHandler.update();
   return Constants.MSG_COLOR + "Successfully set the standard equipment";
 }
コード例 #2
0
 @Override
 public String OnExecute(ICommandExecutor executor, IArgumentList parameters) {
   IPlayer player = parameters.getValue("player");
   if (player == null) return null;
   this.history.save(player);
   player.getInventory().clear();
   player.updateInventory();
   if (executor instanceof IPlayer && executor.getName().equals(player.getName()))
     return "&2Your inventory has been cleared.";
   return "&2Inventory for " + player.getPrettyName() + " &2cleared.";
 }