Remove deprecated data
This commit is contained in:
parent
3f60b5ee27
commit
7dedc538a9
@ -210,12 +210,7 @@ public class Chairs extends JavaPlugin {
|
||||
type = s;
|
||||
}
|
||||
try {
|
||||
Material mat;
|
||||
if (type.matches("\\d+")) {
|
||||
mat = Material.getMaterial(Integer.parseInt(type));
|
||||
} else {
|
||||
mat = Material.matchMaterial(type);
|
||||
}
|
||||
Material mat = Material.matchMaterial(type);
|
||||
if (mat != null) {
|
||||
logInfo("Allowed block: " + mat.toString() + " => " + sh + " => " + d);
|
||||
allowedBlocks.add(new ChairBlock(mat,sh,d));
|
||||
@ -231,12 +226,8 @@ public class Chairs extends JavaPlugin {
|
||||
validSigns = new ArrayList<Material>();
|
||||
for (String type : getConfig().getStringList("valid-signs")) {
|
||||
try {
|
||||
if (type.matches("\\d+")) {
|
||||
validSigns.add(Material.getMaterial(Integer.parseInt(type)));
|
||||
} else {
|
||||
validSigns.add(Material.matchMaterial(type));
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
logError(e.getMessage());
|
||||
}
|
||||
|
@ -100,18 +100,12 @@ public class EventListener implements Listener {
|
||||
blockOkay = true;
|
||||
continue;
|
||||
}
|
||||
} else if (cb.getMat().equals(block.getType())
|
||||
&& cb.getDamage() == block.getData()) {
|
||||
} else if (cb.getMat().equals(block.getType())) {
|
||||
blockOkay = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (
|
||||
player.hasPermission("chairs.sit." + block.getTypeId() + ":" + block.getData()) ||
|
||||
player.hasPermission("chairs.sit." + block.getType().toString() + ":" + block.getData()) ||
|
||||
player.hasPermission("chairs.sit." + block.getTypeId()) ||
|
||||
player.hasPermission("chairs.sit." + block.getType().toString())
|
||||
) {
|
||||
if (player.hasPermission("chairs.sit." + block.getType().toString())) {
|
||||
blockOkay = true;
|
||||
}
|
||||
if (blockOkay) {
|
||||
@ -221,8 +215,7 @@ public class EventListener implements Listener {
|
||||
sh = cb.getSitHeight();
|
||||
continue;
|
||||
}
|
||||
} else if (cb.getMat().equals(block.getType())
|
||||
&& cb.getDamage() == block.getData()) {
|
||||
} else if (cb.getMat().equals(block.getType())) {
|
||||
sh = cb.getSitHeight();
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user