This commit is contained in:
Rammelkast committed 2021-11-15 12:52:27 +01:00
1 parent 84ddce8f1e
commit ebfd8f69af
2 files changed
+11 -1

No files matched your search

@@ -165,7 +165,7 @@ public final class AntiCheatReloaded extends JavaPlugin {
public void run() {
checkForSymbiosis();
try {
Metrics metrics = new Metrics(AntiCheatReloaded.this, 202);
final Metrics metrics = new Metrics(AntiCheatReloaded.this, 202);
metrics.addCustomChart(new Metrics.SingleLineChart("cheaters_kicked", new Callable<Integer>() {
@Override
public Integer call() throws Exception {
@@ -193,6 +193,12 @@ public final class AntiCheatReloaded extends JavaPlugin {
return symbiosisMetric;
}
}));
metrics.addCustomChart(new Metrics.SimplePie("floodgate_enabled", new Callable<String>() {
@Override
public String call() throws Exception {
return floodgateEnabled ? "Yes" : "No";
}
}));
} catch (Exception e) {
e.printStackTrace();
}
@@ -86,6 +86,10 @@ public final class IllegalInteract {
private static CheckResult checkBlockPlace(final Player player, final BlockPlaceEvent event) {
final BlockFace face = event.getBlock().getFace(event.getBlockAgainst());
if (face == null) {
return PASS;
}
final Vector vector = new Vector(face.getModX(), face.getModY(), face.getModZ());
if (event.getBlock().getType().isSolid()
&& player.getLocation().getDirection().angle(vector) > Math.toRadians(90)) {