fixed fast leave decay won't work
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -88,9 +88,9 @@ public class EnvironmentExListeners implements Listener {
|
||||
}
|
||||
|
||||
private void randomWeather(Block bed) {
|
||||
App.main.log(bed.getWorld().getWeatherDuration()+"dura");
|
||||
App.main.log(bed.getWorld().isThundering()+"thunder");
|
||||
App.main.log(bed.getWorld().hasStorm()+"storm");
|
||||
App.main.log(bed.getWorld().getWeatherDuration() + "dura");
|
||||
App.main.log(bed.getWorld().isThundering() + "thunder");
|
||||
App.main.log(bed.getWorld().hasStorm() + "storm");
|
||||
if (bed.getWorld().isThundering()) {
|
||||
bed.getWorld().setThundering(false);
|
||||
|
||||
@@ -222,22 +222,22 @@ public class EnvironmentExListeners implements Listener {
|
||||
}
|
||||
break;
|
||||
case NOT_POSSIBLE_NOW:
|
||||
e.setCancelled(true);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(
|
||||
helper.R3SMessage(Type.ERROR, "Du kannst nur nachts oder während eines Gewitters schlafen"));
|
||||
break;
|
||||
case NOT_SAFE:
|
||||
e.setCancelled(true);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(
|
||||
helper.R3SMessage(Type.ERROR, "Du kannst jetzt nicht schlafen, es sind Monster in der Nähe"));
|
||||
break;
|
||||
case TOO_FAR_AWAY:
|
||||
e.setCancelled(true);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(
|
||||
helper.R3SMessage(Type.ERROR, "Du kannst jetzt nicht schlafen, das Bett ist zu weit entfernt"));
|
||||
break;
|
||||
case OBSTRUCTED:
|
||||
e.setCancelled(true);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(helper.R3SMessage(Type.ERROR, "Dieses Bett ist blockiert"));
|
||||
break;
|
||||
|
||||
@@ -488,8 +488,9 @@ public class EnvironmentExListeners implements Listener {
|
||||
return false;
|
||||
} else {
|
||||
if (this.spawnParticles) {
|
||||
block.getWorld().spawnParticle(Particle.DUST, block.getLocation().add(0.5D, 0.5D, 0.5D),
|
||||
8, 0.2D, 0.2D, 0.2D, 0.0D, block.getType().createBlockData());
|
||||
// block.getWorld().spawnParticle(Particle.ASH, block.getLocation().add(0.5D,
|
||||
// 0.5D, 0.5D), 8, 0.2D,
|
||||
// 0.2D, 0.2D, 0.0D, block.getType().createBlockData());
|
||||
}
|
||||
|
||||
if (this.playSound) {
|
||||
@@ -1225,7 +1226,7 @@ public class EnvironmentExListeners implements Listener {
|
||||
|
||||
} else {
|
||||
// WENN IHC OPEN KLICKE ALLES VON INV NACH OPEN
|
||||
|
||||
|
||||
int i = 0;
|
||||
for (ItemStack is : e.getWhoClicked().getInventory().getStorageContents()) {
|
||||
if (e.getWhoClicked().getOpenInventory().getTopInventory().firstEmpty() == -1) {
|
||||
@@ -1243,8 +1244,10 @@ public class EnvironmentExListeners implements Listener {
|
||||
|| is.getItemMeta().getPersistentDataContainer().has(App.main.nsk3,
|
||||
PersistentDataType.STRING)
|
||||
|| is.getItemMeta().getPersistentDataContainer().has(App.main.nsk4,
|
||||
PersistentDataType.STRING) || (e.getWhoClicked().getOpenInventory().getTopInventory().getType().equals(InventoryType.SHULKER_BOX) && is.getType().toString().contains("SHULKER_BOX"))
|
||||
) {
|
||||
PersistentDataType.STRING)
|
||||
|| (e.getWhoClicked().getOpenInventory().getTopInventory().getType()
|
||||
.equals(InventoryType.SHULKER_BOX)
|
||||
&& is.getType().toString().contains("SHULKER_BOX"))) {
|
||||
|
||||
} else {
|
||||
e.getWhoClicked().getOpenInventory().getTopInventory().addItem(is);
|
||||
@@ -1266,8 +1269,8 @@ public class EnvironmentExListeners implements Listener {
|
||||
&& e.getCurrentItem().getType().equals(Material.AIR)
|
||||
&& e.getClickedInventory().getType().equals(InventoryType.PLAYER)) {
|
||||
if (e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.CHEST
|
||||
|| e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.ENDER_CHEST || e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.SHULKER_BOX
|
||||
) {
|
||||
|| e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.ENDER_CHEST
|
||||
|| e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.SHULKER_BOX) {
|
||||
// WENN IN INVENTAR GEKLICKT SCHIEBE VON OPEN NACH INV
|
||||
int i = 0;
|
||||
for (ItemStack is : e.getWhoClicked().getOpenInventory().getTopInventory().getStorageContents()) {
|
||||
@@ -1285,7 +1288,8 @@ public class EnvironmentExListeners implements Listener {
|
||||
} else if (e.getClick().toString().equals("DOUBLE_CLICK") && e.getCursor().getType().equals(Material.AIR)
|
||||
&& e.getCurrentItem().getType().equals(Material.AIR) &&
|
||||
(e.getClickedInventory().getType().equals(InventoryType.CHEST)
|
||||
|| e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.ENDER_CHEST)) {
|
||||
|| e.getWhoClicked().getOpenInventory().getTopInventory()
|
||||
.getType() == InventoryType.ENDER_CHEST)) {
|
||||
|
||||
// WENN OPEN GEKLICKT SCHIEBE VON INV NACH OPEN
|
||||
int i = 0;
|
||||
@@ -1299,15 +1303,16 @@ public class EnvironmentExListeners implements Listener {
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else if(e.getClick().toString().equals("DOUBLE_CLICK") && e.getCursor().getType().equals(Material.AIR)
|
||||
&& e.getCurrentItem().getType().equals(Material.AIR) && e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.SHULKER_BOX){
|
||||
} else if (e.getClick().toString().equals("DOUBLE_CLICK") && e.getCursor().getType().equals(Material.AIR)
|
||||
&& e.getCurrentItem().getType().equals(Material.AIR)
|
||||
&& e.getWhoClicked().getOpenInventory().getTopInventory().getType() == InventoryType.SHULKER_BOX) {
|
||||
int i = 0;
|
||||
for (ItemStack is : e.getWhoClicked().getInventory().getStorageContents()) {
|
||||
if (e.getWhoClicked().getOpenInventory().getTopInventory().firstEmpty() == -1) {
|
||||
return;
|
||||
}
|
||||
if (is != null && (e.getWhoClicked().getOpenInventory().getTopInventory().getType().equals(InventoryType.SHULKER_BOX) && !is.getType().toString().contains("SHULKER_BOX"))) {
|
||||
if (is != null && (e.getWhoClicked().getOpenInventory().getTopInventory().getType()
|
||||
.equals(InventoryType.SHULKER_BOX) && !is.getType().toString().contains("SHULKER_BOX"))) {
|
||||
e.getWhoClicked().getInventory().setItem(i, null);
|
||||
e.getWhoClicked().getOpenInventory().getTopInventory().addItem(is);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user