mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-18 07:07:35 +01:00
Fix CITIZENS-402
This commit is contained in:
parent
fed0f1d576
commit
c3344f243a
@ -180,7 +180,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
// Disable if the server is not using the compatible Minecraft version
|
// Disable if the server is not using the compatible Minecraft version
|
||||||
String mcVersion = Util.getMinecraftVersion();
|
String mcVersion = Util.getMinecraftVersion();
|
||||||
compatible = mcVersion.startsWith(COMPATIBLE_MC_VERSION);
|
compatible = mcVersion.startsWith(COMPATIBLE_MC_VERSION);
|
||||||
if (!compatible) {
|
if (Setting.CHECK_MINECRAFT_VERSION.asBoolean() && !compatible) {
|
||||||
Messaging.severeTr(Messages.CITIZENS_INCOMPATIBLE, getDescription().getVersion(), mcVersion);
|
Messaging.severeTr(Messages.CITIZENS_INCOMPATIBLE, getDescription().getVersion(), mcVersion);
|
||||||
getServer().getPluginManager().disablePlugin(this);
|
getServer().getPluginManager().disablePlugin(this);
|
||||||
return;
|
return;
|
||||||
|
@ -31,11 +31,6 @@ public class Settings {
|
|||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMessagingSettings() {
|
|
||||||
Messaging.configure(Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
|
|
||||||
Setting.HIGHLIGHT_COLOUR.asString());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void reload() {
|
public void reload() {
|
||||||
config.load();
|
config.load();
|
||||||
for (Setting setting : Setting.values())
|
for (Setting setting : Setting.values())
|
||||||
@ -50,6 +45,11 @@ public class Settings {
|
|||||||
config.save();
|
config.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateMessagingSettings() {
|
||||||
|
Messaging.configure(Setting.DEBUG_MODE.asBoolean(), Setting.MESSAGE_COLOUR.asString(),
|
||||||
|
Setting.HIGHLIGHT_COLOUR.asString());
|
||||||
|
}
|
||||||
|
|
||||||
public enum Setting {
|
public enum Setting {
|
||||||
CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true),
|
CHAT_BYSTANDERS_HEAR_TARGETED_CHAT("npc.chat.options.bystanders-hear-targeted-chat", true),
|
||||||
CHAT_FORMAT("npc.chat.format.no-targets", "[<npc>]: <text>"),
|
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",
|
CHAT_MULTIPLE_TARGETS_FORMAT("npc.chat.options.multiple-targets-format",
|
||||||
"<target>|, <target>| & <target>| & others"),
|
"<target>|, <target>| & <target>| & others"),
|
||||||
CHAT_RANGE("npc.chat.options.range", 5),
|
CHAT_RANGE("npc.chat.options.range", 5),
|
||||||
|
CHECK_MINECRAFT_VERSION("advanced.check-minecraft-version", true),
|
||||||
DATABASE_DRIVER("storage.database.driver", ""),
|
DATABASE_DRIVER("storage.database.driver", ""),
|
||||||
DATABASE_PASSWORD("storage.database.password", ""),
|
DATABASE_PASSWORD("storage.database.password", ""),
|
||||||
DATABASE_URL("storage.database.url", ""),
|
DATABASE_URL("storage.database.url", ""),
|
||||||
|
@ -26,10 +26,10 @@ public class Util {
|
|||||||
|
|
||||||
private static final Location AT_LOCATION = new Location(null, 0, 0, 0);
|
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 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<? extends Random> RNG_CONSTRUCTOR = null;
|
||||||
|
|
||||||
|
private static Constructor<?> SEED_GENERATOR_CONSTRUCTOR = null;
|
||||||
|
|
||||||
public static void assumePose(LivingEntity entity, float yaw, float pitch) {
|
public static void assumePose(LivingEntity entity, float yaw, float pitch) {
|
||||||
NMS.look(entity, yaw, pitch);
|
NMS.look(entity, yaw, pitch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user