forked from SteamWar/SteamWar
Fixes
This commit is contained in:
@@ -30,7 +30,7 @@ import org.bukkit.scoreboard.Scoreboard;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class SWScoreboard21 implements SWScoreboard.ISWScoreboard {
|
||||
public class SWScoreboard21 implements SWScoreboard {
|
||||
|
||||
private static final HashMap<Player, ScoreboardCallback> playerBoards = new HashMap<>();
|
||||
private static final String SIDEBAR = "sw-sidebar";
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.bukkit.entity.Player;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class SWScoreboard8 implements SWScoreboard.ISWScoreboard {
|
||||
public class SWScoreboard8 implements SWScoreboard {
|
||||
private static final Reflection.FieldAccessor<String> scoreboardName = Reflection.getField(FlatteningWrapper.scoreboardObjective, String.class, 0);
|
||||
private static final Reflection.FieldAccessor<Integer> scoreboardAction = Reflection.getField(FlatteningWrapper.scoreboardObjective, int.class, Core.getVersion() > 15 ? 3 : 0);
|
||||
private static final Class<?> scoreboardDisplayEnum = Reflection.getClass("{nms.world.scores.criteria}.IScoreboardCriteria$EnumScoreboardHealthDisplay");
|
||||
|
||||
@@ -23,21 +23,9 @@ import de.steamwar.core.Core;
|
||||
import de.steamwar.core.VersionDependent;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class SWScoreboard {
|
||||
private SWScoreboard() {}
|
||||
public interface SWScoreboard {
|
||||
public static final SWScoreboard impl = VersionDependent.getVersionImpl(Core.getInstance());
|
||||
|
||||
private static final ISWScoreboard impl = VersionDependent.getVersionImpl(Core.getInstance());
|
||||
|
||||
public static boolean createScoreboard(Player player, ScoreboardCallback callback) {
|
||||
return impl.createScoreboard(player, callback);
|
||||
}
|
||||
|
||||
public static void removeScoreboard(Player player) {
|
||||
impl.removeScoreboard(player);
|
||||
}
|
||||
|
||||
public interface ISWScoreboard {
|
||||
boolean createScoreboard(Player player, ScoreboardCallback callback);
|
||||
void removeScoreboard(Player player);
|
||||
}
|
||||
boolean createScoreboard(Player player, ScoreboardCallback callback);
|
||||
void removeScoreboard(Player player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user