mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 20:55:44 +01:00
Add 1.8.7 as compatible
This commit is contained in:
parent
00361a6438
commit
176f8dd9ad
@ -258,7 +258,9 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
config = new Settings(getDataFolder());
|
||||
// Disable if the server is not using the compatible Minecraft version
|
||||
String mcVersion = Util.getMinecraftVersion();
|
||||
compatible = mcVersion.startsWith(COMPATIBLE_MC_VERSION);
|
||||
for (String version : COMPATIBLE_MC_VERSIONS) {
|
||||
compatible |= mcVersion.startsWith(version);
|
||||
}
|
||||
if (Setting.CHECK_MINECRAFT_VERSION.asBoolean() && !compatible) {
|
||||
Messaging.severeTr(Messages.CITIZENS_INCOMPATIBLE, getDescription().getVersion(), mcVersion);
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
@ -454,5 +456,5 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final String COMPATIBLE_MC_VERSION = "1.8.6";
|
||||
private static final String[] COMPATIBLE_MC_VERSIONS = { "1.8.5", "1.8.6", "1.8.7" };
|
||||
}
|
||||
|
@ -237,7 +237,6 @@ public class CitizensNPC extends AbstractNPC {
|
||||
final CraftPlayer player = (CraftPlayer) getEntity();
|
||||
NMS.replaceTrackerEntry(player);
|
||||
new BukkitRunnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
NMS.sendPacketsNearby(player, player.getLocation(),
|
||||
|
@ -2,6 +2,9 @@ package net.citizensnpcs.util.nms;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import net.citizensnpcs.api.CitizensAPI;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.minecraft.server.v1_8_R3.Entity;
|
||||
@ -9,9 +12,6 @@ import net.minecraft.server.v1_8_R3.EntityPlayer;
|
||||
import net.minecraft.server.v1_8_R3.EntityTrackerEntry;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
public class PlayerlistTrackerEntry extends EntityTrackerEntry {
|
||||
public PlayerlistTrackerEntry(Entity entity, int i, int j, boolean flag) {
|
||||
super(entity, i, j, flag);
|
||||
|
Loading…
Reference in New Issue
Block a user