Merge branch 'master' into RegionFix
Dieser Commit ist enthalten in:
Commit
1146b7ab7c
@ -42,11 +42,8 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.lang.management.ManagementFactory;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class BauSystem extends JavaPlugin implements Listener {
|
public class BauSystem extends JavaPlugin implements Listener {
|
||||||
private static BauSystem plugin;
|
private static BauSystem plugin;
|
||||||
@ -175,6 +172,7 @@ public class BauSystem extends JavaPlugin implements Listener {
|
|||||||
Bukkit.shutdown();
|
Bukkit.shutdown();
|
||||||
}
|
}
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
|
Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable);
|
||||||
Bukkit.shutdown();
|
Bukkit.shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem;
|
package de.steamwar.bausystem;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class RamUsage {
|
public class RamUsage {
|
||||||
|
|
||||||
@ -33,6 +36,7 @@ public class RamUsage {
|
|||||||
long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize();
|
long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize();
|
||||||
return (memorySize - freeMemory) / (double) memorySize;
|
return (memorySize - freeMemory) / (double) memorySize;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
|
Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable);
|
||||||
return 1D;
|
return 1D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ public class CommandTNT extends SWCommand implements Listener {
|
|||||||
public void setCommand(Player p, TNTMode tntMode) {
|
public void setCommand(Player p, TNTMode tntMode) {
|
||||||
if (!permissionCheck(p)) return;
|
if (!permissionCheck(p)) return;
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
tntToggle(region, null, null);
|
|
||||||
|
|
||||||
String requestedMessage = null;
|
String requestedMessage = null;
|
||||||
switch (tntMode) {
|
switch (tntMode) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren