Merge remote-tracking branch 'origin/master'
Dieser Commit ist enthalten in:
Commit
c1012e6ac3
@ -45,13 +45,14 @@ public class NavWandBauGuiItem extends BauGuiItem {
|
||||
|
||||
@Override
|
||||
public ItemStack getItem(Player player) {
|
||||
return new SWItem(Material.WOODEN_AXE, "Navigation Wand", Arrays.asList("Left click: jump to location", "Right click: pass through walls"), false, clickType -> {
|
||||
return new SWItem(Material.COMPASS, "Navigation Wand", Arrays.asList("Left click: jump to location", "Right click: pass through walls"), false, clickType -> {
|
||||
}).getItemStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean click(ClickType click, Player p) {
|
||||
p.performCommand("/wand -n");
|
||||
p.closeInventory();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ public class WorldEditBauGuiItem extends BauGuiItem {
|
||||
@Override
|
||||
public boolean click(ClickType click, Player p) {
|
||||
p.performCommand("/wand");
|
||||
p.closeInventory();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ public class AutoShutdownListener implements Listener {
|
||||
Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable);
|
||||
Bukkit.shutdown();
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}, 20, 20);
|
||||
}
|
||||
|
@ -47,7 +47,8 @@ public class BauScoreboard implements Listener {
|
||||
private HashMap<String, Integer> sidebar(Player p) {
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
|
||||
String colorCode = BauSystem.MESSAGE.parse(region.get(Flag.COLOR).getChatValue(), p).substring(0, 2);
|
||||
// String colorCode = BauSystem.MESSAGE.parse(region.get(Flag.COLOR).getChatValue(), p).substring(0, 2);
|
||||
String colorCode = "§e";
|
||||
|
||||
List<String> strings = new ArrayList<>();
|
||||
strings.add("§1");
|
||||
|
@ -20,23 +20,30 @@
|
||||
package de.steamwar.bausystem.features.world;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.util.logging.Level;
|
||||
import java.io.*;
|
||||
|
||||
@UtilityClass
|
||||
public class RamUsage {
|
||||
|
||||
private File meminfo = new File("/proc/meminfo");
|
||||
|
||||
public static double getUsage() {
|
||||
try {
|
||||
long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
|
||||
long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize();
|
||||
return (memorySize - freeMemory) / (double) memorySize;
|
||||
} catch (Throwable throwable) {
|
||||
Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable);
|
||||
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(meminfo)))) {
|
||||
String memTotal = bufferedReader.readLine().replaceAll(" +", " ");
|
||||
bufferedReader.readLine();
|
||||
String memAvailable = bufferedReader.readLine().replaceAll(" +", " ");
|
||||
|
||||
long memTotalLong = getNumber(memTotal);
|
||||
long memAvailableLong = getNumber(memAvailable);
|
||||
return (memTotalLong - memAvailableLong) / (double) memTotalLong;
|
||||
} catch (IOException e) {
|
||||
return 1D;
|
||||
}
|
||||
}
|
||||
|
||||
private static long getNumber(String s) {
|
||||
return Long.parseLong(s.split(" ")[1]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
@version(1)
|
||||
wg{
|
||||
displayName(WarGear)
|
||||
schematic(sections4/WGArena.schem)
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
@version(1)
|
||||
wg11{
|
||||
minX(-188)
|
||||
minY(1)
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren