Project cleanup pre merge.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
package engine.devcmd.cmds;
|
||||
|
||||
import engine.Enum.GameObjectType;
|
||||
@@ -18,56 +17,50 @@ import engine.objects.PlayerCharacter;
|
||||
|
||||
public class DespawnCmd extends AbstractDevCmd {
|
||||
|
||||
public DespawnCmd() {
|
||||
public DespawnCmd() {
|
||||
super("debugmob");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
if (pc == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Mob mob = null;
|
||||
|
||||
if (target != null && target.getObjectType().equals(GameObjectType.Mob))
|
||||
mob = (Mob)target;
|
||||
|
||||
if (mob == null)
|
||||
mob = Mob.getFromCache(Integer.parseInt(words[1]));
|
||||
|
||||
if (mob == null)
|
||||
return;
|
||||
|
||||
if (words[0].equalsIgnoreCase("respawn")){
|
||||
mob.respawn();
|
||||
this.throwbackInfo(pc, "Mob with ID " + mob.getObjectUUID() + " Respawned");
|
||||
}else if (words[0].equalsIgnoreCase("despawn")){
|
||||
mob.despawn();
|
||||
this.throwbackInfo(pc, "Mob with ID " + mob.getObjectUUID() + " Despawned");
|
||||
}
|
||||
}
|
||||
if (pc == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Gets distance from a target.";
|
||||
|
||||
}
|
||||
Mob mob = null;
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /distance'";
|
||||
if (target != null && target.getObjectType().equals(GameObjectType.Mob))
|
||||
mob = (Mob) target;
|
||||
|
||||
}
|
||||
if (mob == null)
|
||||
mob = Mob.getFromCache(Integer.parseInt(words[1]));
|
||||
|
||||
if (mob == null)
|
||||
return;
|
||||
|
||||
if (words[0].equalsIgnoreCase("respawn")) {
|
||||
mob.respawn();
|
||||
this.throwbackInfo(pc, "Mob with ID " + mob.getObjectUUID() + " Respawned");
|
||||
} else if (words[0].equalsIgnoreCase("despawn")) {
|
||||
mob.despawn();
|
||||
this.throwbackInfo(pc, "Mob with ID " + mob.getObjectUUID() + " Despawned");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Gets distance from a target.";
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /distance'";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user