Fix formatting with pullrequest, remove dragon, to @Rigby90's point, this will be bad for 3rd party addons.

This commit is contained in:
Eric Stokes 2011-11-25 18:07:46 -07:00
parent f894859df9
commit 4006e53243
4 changed files with 11 additions and 18 deletions

View File

@ -80,20 +80,10 @@ public class PurgeCommand extends MultiverseCommand {
if (deathName.equalsIgnoreCase("all") || deathName.equalsIgnoreCase("animals") || deathName.equalsIgnoreCase("monsters")) {
thingsToKill.add(deathName.toUpperCase());
} else {
for (String d :deathName.toUpperCase().split(",")) {
if(d.equalsIgnoreCase("dragon")){ //could be replaced with a Map(Hash?) to allow for all mobs to have multiple keywords
thingsToKill.add("ENDERDRAGON");// note UpperCase needed on this literal
}
else{
thingsToKill.add(d);
}
}
Collections.addAll(thingsToKill, deathName.toUpperCase().split(","));
}
for (MultiverseWorld w : worldsToRemoveEntitiesFrom) {
purger.purgeWorld(sender, w, thingsToKill, false, false);
}
return;
}
}

View File

@ -86,7 +86,6 @@ public class VersionCommand extends MultiverseCommand {
data += "&" + URLEncoder.encode("api_paste_code", "UTF-8") + "=" + URLEncoder.encode(this.pasteBinBuffer, "UTF-8");
data += "&" + URLEncoder.encode("api_paste_private", "UTF-8") + "=" + URLEncoder.encode("1", "UTF-8");
data += "&" + URLEncoder.encode("api_paste_format", "UTF-8") + "=" + URLEncoder.encode("yaml", "UTF-8");
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
// We're out of
//data += "&" + URLEncoder.encode("api_paste_name", "UTF-8") + "=" + URLEncoder.encode("Multiverse 2 Dump " + dateFormat.format(date), "UTF-8");

View File

@ -152,7 +152,12 @@ public class MVPlayerListener extends PlayerListener {
// If the player was actually outside of the portal, adjust the from location
if (event.getFrom().getWorld().getBlockAt(event.getFrom()).getType() != Material.PORTAL) {
event.setFrom(SafeTTeleporter.findPortalBlockNextTo(event.getFrom()));
Location newloc = SafeTTeleporter.findPortalBlockNextTo(event.getFrom());
// TODO: Fix this. Currently, we only check for PORTAL blocks. I'll have to figure out what
// TODO: we want to do here.
if (newloc != null) {
event.setFrom(newloc);
}
}
MultiverseWorld fromWorld = this.worldManager.getMVWorld(event.getFrom().getWorld().getName());
MultiverseWorld toWorld = this.worldManager.getMVWorld(event.getTo().getWorld().getName());

View File

@ -59,7 +59,7 @@ public class PurgeWorlds {
return;
}
int entitiesKilled = 0;
for (Entity e : world.getEntities()){
for (Entity e : world.getEntities()) {
this.plugin.log(Level.FINEST, "Entity list (aval for purge) from WORLD < " + mvworld.getName() + " >: " + e.toString());
// Check against Monsters
@ -108,11 +108,10 @@ public class PurgeWorlds {
*/
private boolean killMonster(MultiverseWorld mvworld, Entity e, List<String> creaturesToKill, boolean negate) {
String entityName = "";
//TODO: Fixme once either Rigby puts his awesome thing in OR Enderdragon gets a toString, OR both.
if (e instanceof EnderDragon) {
this.plugin.log(Level.FINEST, "Found an enderdragon: " + e);
entityName = "ENDERDRAGON"; // Assumes that creaturesToKill contains the ENDERDRAGON keyword
}
else{
entityName = "ENDERDRAGON";
} else {
entityName = e.toString().replaceAll("Craft", "").toUpperCase();
}
if (e instanceof Slime || e instanceof Monster || e instanceof Ghast || e instanceof EnderDragon) {