mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-08-25 23:22:48 +02:00
Fixed some typos in the commands
This commit is contained in:
parent
2d34be3276
commit
0e43fb481d
|
@ -90,7 +90,7 @@ public class DisguiseCommand implements CommandExecutor {
|
||||||
+ " isn't true or false!");
|
+ " isn't true or false!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
adult = args[1].equalsIgnoreCase("false");
|
adult = args[1].equalsIgnoreCase("false"); // Adult = !arg
|
||||||
}
|
}
|
||||||
disguise = new MobDisguise(disguiseType, adult);
|
disguise = new MobDisguise(disguiseType, adult);
|
||||||
} else if (disguiseType.isMisc()) {
|
} else if (disguiseType.isMisc()) {
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class DisguiseEntityCommand implements CommandExecutor {
|
||||||
+ " isn't true or false!");
|
+ " isn't true or false!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
adult = args[1].equalsIgnoreCase("false");
|
adult = args[1].equalsIgnoreCase("false"); // Adult = !arg
|
||||||
}
|
}
|
||||||
disguise = new MobDisguise(disguiseType, adult);
|
disguise = new MobDisguise(disguiseType, adult);
|
||||||
} else if (disguiseType.isMisc()) {
|
} else if (disguiseType.isMisc()) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class DisguisePlayerCommand implements CommandExecutor {
|
||||||
+ " isn't true or false!");
|
+ " isn't true or false!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
adult = args[1].equalsIgnoreCase("false");
|
adult = args[2].equalsIgnoreCase("false"); // Adult = !arg
|
||||||
}
|
}
|
||||||
disguise = new MobDisguise(disguiseType, adult);
|
disguise = new MobDisguise(disguiseType, adult);
|
||||||
} else if (disguiseType.isMisc()) {
|
} else if (disguiseType.isMisc()) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class DisguiseRadiusCommand implements CommandExecutor {
|
||||||
+ " isn't true or false!");
|
+ " isn't true or false!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
adult = args[1].equalsIgnoreCase("false");
|
adult = args[2].equalsIgnoreCase("false"); // Adult = !arg
|
||||||
}
|
}
|
||||||
disguise = new MobDisguise(disguiseType, adult);
|
disguise = new MobDisguise(disguiseType, adult);
|
||||||
} else if (disguiseType.isMisc()) {
|
} else if (disguiseType.isMisc()) {
|
||||||
|
|
|
@ -40,9 +40,11 @@ public class Values {
|
||||||
values.put(type, this);
|
values.put(type, this);
|
||||||
declared = classType;
|
declared = classType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, Double> getAttributesValues() {
|
public HashMap<String, Double> getAttributesValues() {
|
||||||
return attributesValues;
|
return attributesValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class getEntityClass() {
|
public Class getEntityClass() {
|
||||||
return declared;
|
return declared;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,7 @@ import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import me.libraryaddict.disguise.Commands.DisguiseCommand;
|
import me.libraryaddict.disguise.Commands.*;
|
||||||
import me.libraryaddict.disguise.Commands.DisguisePlayerCommand;
|
|
||||||
import me.libraryaddict.disguise.Commands.UndisguiseCommand;
|
|
||||||
import me.libraryaddict.disguise.Commands.UndisguisePlayerCommand;
|
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
import me.libraryaddict.disguise.DisguiseTypes.Disguise;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.DisguiseType;
|
import me.libraryaddict.disguise.DisguiseTypes.DisguiseType;
|
||||||
import me.libraryaddict.disguise.DisguiseTypes.PlayerDisguise;
|
import me.libraryaddict.disguise.DisguiseTypes.PlayerDisguise;
|
||||||
|
@ -131,7 +128,6 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
||||||
StructureModifier<Object> mods = event.getPacket().getModifier();
|
StructureModifier<Object> mods = event.getPacket().getModifier();
|
||||||
String name = (String) mods.read(1);
|
String name = (String) mods.read(1);
|
||||||
if (!name.equals(((PlayerDisguise) disguise).getName())) {
|
if (!name.equals(((PlayerDisguise) disguise).getName())) {
|
||||||
// manager.sendServerPacket(observer, disguise.constructDestroyPacket(entity.getEntityId()));
|
|
||||||
final PacketContainer[] packets = disguise.constructPacket(entity);
|
final PacketContainer[] packets = disguise.constructPacket(entity);
|
||||||
event.setPacket(packets[0]);
|
event.setPacket(packets[0]);
|
||||||
if (packets.length > 1) {
|
if (packets.length > 1) {
|
||||||
|
@ -147,7 +143,6 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// manager.sendServerPacket(observer, disguise.constructDestroyPacket(entity.getEntityId()));
|
|
||||||
final PacketContainer[] packets = disguise.constructPacket(entity);
|
final PacketContainer[] packets = disguise.constructPacket(entity);
|
||||||
event.setPacket(packets[0]);
|
event.setPacket(packets[0]);
|
||||||
if (packets.length > 1) {
|
if (packets.length > 1) {
|
||||||
|
@ -166,7 +161,6 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
||||||
|| event.getPacketID() == Packets.Server.ADD_EXP_ORB
|
|| event.getPacketID() == Packets.Server.ADD_EXP_ORB
|
||||||
|| event.getPacketID() == Packets.Server.VEHICLE_SPAWN
|
|| event.getPacketID() == Packets.Server.VEHICLE_SPAWN
|
||||||
|| event.getPacketID() == Packets.Server.ENTITY_PAINTING) {
|
|| event.getPacketID() == Packets.Server.ENTITY_PAINTING) {
|
||||||
// manager.sendServerPacket(observer, disguise.constructDestroyPacket(entity.getEntityId()));
|
|
||||||
final PacketContainer[] packets = disguise.constructPacket(entity);
|
final PacketContainer[] packets = disguise.constructPacket(entity);
|
||||||
event.setPacket(packets[0]);
|
event.setPacket(packets[0]);
|
||||||
if (packets.length > 1) {
|
if (packets.length > 1) {
|
||||||
|
@ -226,10 +220,16 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
DisguiseListener listener = new DisguiseListener(this);
|
||||||
|
Bukkit.getPluginManager().registerEvents(listener, this);
|
||||||
getCommand("disguise").setExecutor(new DisguiseCommand());
|
getCommand("disguise").setExecutor(new DisguiseCommand());
|
||||||
getCommand("undisguise").setExecutor(new UndisguiseCommand());
|
getCommand("undisguise").setExecutor(new UndisguiseCommand());
|
||||||
getCommand("disguiseplayer").setExecutor(new DisguisePlayerCommand());
|
getCommand("disguiseplayer").setExecutor(new DisguisePlayerCommand());
|
||||||
getCommand("undisguiseplayer").setExecutor(new UndisguisePlayerCommand());
|
getCommand("undisguiseplayer").setExecutor(new UndisguisePlayerCommand());
|
||||||
|
getCommand("undisguiseentity").setExecutor(new UndisguiseEntityCommand(listener));
|
||||||
|
getCommand("disguiseentity").setExecutor(new DisguiseEntityCommand(listener));
|
||||||
|
getCommand("disguiseradius").setExecutor(new DisguiseRadiusCommand());
|
||||||
|
getCommand("undisguiseradius").setExecutor(new UndisguiseRadiusCommand());
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
permission = getConfig().getString("Permission");
|
permission = getConfig().getString("Permission");
|
||||||
if (getConfig().getBoolean("NotifyUpdate")) {
|
if (getConfig().getBoolean("NotifyUpdate")) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user