Fix CITIZENS-402

This commit is contained in:
fullwall 2013-01-30 22:46:30 +08:00
parent fed0f1d576
commit c3344f243a
3 changed files with 9 additions and 8 deletions

View File

@ -180,7 +180,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
// Disable if the server is not using the compatible Minecraft version
String mcVersion = Util.getMinecraftVersion();
compatible = mcVersion.startsWith(COMPATIBLE_MC_VERSION);
if (!compatible) {
if (Setting.CHECK_MINECRAFT_VERSION.asBoolean() && !compatible) {
Messaging.severeTr(Messages.CITIZENS_INCOMPATIBLE, getDescription().getVersion(), mcVersion);
getServer().getPluginManager().disablePlugin(this);
return;

View File

@ -31,11 +31,6 @@ public class Settings {
save();
}
private void updateMessagingSettings() {
Messaging.configure(Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
Setting.HIGHLIGHT_COLOUR.asString());
}
public void reload() {
config.load();
for (Setting setting : Setting.values())
@ -50,6 +45,11 @@ public class Settings {
config.save();
}
private void updateMessagingSettings() {
Messaging.configure(Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
Setting.HIGHLIGHT_COLOUR.asString());
}
public enum Setting {
CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true),
CHAT_FORMAT("npc.chat.format.no-targets", "[<npc>]: <text>"),
@ -61,6 +61,7 @@ public class Settings {
CHAT_MULTIPLE_TARGETS_FORMAT("npc.chat.options.multiple-targets-format",
"<target>|, <target>| & <target>| & others"),
CHAT_RANGE("npc.chat.options.range", 5),
CHECK_MINECRAFT_VERSION("advanced.check-minecraft-version", true),
DATABASE_DRIVER("storage.database.driver", ""),
DATABASE_PASSWORD("storage.database.password", ""),
DATABASE_URL("storage.database.url", ""),

View File

@ -26,10 +26,10 @@ public class Util {
private static final Location AT_LOCATION = new Location(null, 0, 0, 0);
private static final Location FROM_LOCATION = new Location(null, 0, 0, 0);
private static Constructor<?> SEED_GENERATOR_CONSTRUCTOR = null;
private static Constructor<? extends Random> RNG_CONSTRUCTOR = null;
private static Constructor<?> SEED_GENERATOR_CONSTRUCTOR = null;
public static void assumePose(LivingEntity entity, float yaw, float pitch) {
NMS.look(entity, yaw, pitch);
}