Fix Debugstick in 1.12 and some more things
Dieser Commit ist enthalten in:
Ursprung
d825a19a98
Commit
d36700e663
@ -28,8 +28,8 @@ class CommandDebugStick_15 {
|
||||
|
||||
static void giveStick(Player player){
|
||||
if(player.getInventory().getItemInMainHand().getType() == Material.AIR)
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.DEBUG_STICK, 1));
|
||||
player.getInventory().setItemInMainHand(new ItemStack(Material.DEBUG_STICK));
|
||||
else
|
||||
player.getInventory().setItemInOffHand(new ItemStack(Material.DEBUG_STICK, 1));
|
||||
player.getInventory().addItem(new ItemStack(Material.DEBUG_STICK));
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ public class CommandDetonator implements CommandExecutor {
|
||||
if(player.getInventory().getItemInMainHand().getType() == Material.AIR)
|
||||
player.getInventory().setItemInMainHand(Detonator.WAND);
|
||||
else
|
||||
player.getInventory().setItemInOffHand(Detonator.WAND);
|
||||
player.getInventory().addItem(Detonator.WAND);
|
||||
player.updateInventory();
|
||||
Detonator.getDetonator(player);
|
||||
break;
|
||||
|
@ -5,6 +5,7 @@ import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
|
||||
import de.steamwar.bausystem.tracer.show.TraceShowManager;
|
||||
import de.steamwar.bausystem.world.*;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
@ -84,7 +85,7 @@ public class CommandGUI implements CommandExecutor, Listener {
|
||||
player.closeInventory();
|
||||
player.performCommand("/wand");
|
||||
});
|
||||
inv.setItem(41, Material.DEBUG_STICK, "§7Debugstick", Arrays.asList("§8/§7debugstick"), false, clickType -> {
|
||||
inv.setItem(41, getMaterial("DEBUG_STICK", "STICK"), "§7Debugstick", Arrays.asList("§8/§7debugstick"), Core.getVersion() < 13,clickType -> {
|
||||
player.closeInventory();
|
||||
player.performCommand("debugstick");
|
||||
});
|
||||
|
@ -50,7 +50,7 @@ public class CommandSkull implements CommandExecutor {
|
||||
if(p.getInventory().getItemInMainHand().getType() == Material.AIR)
|
||||
p.getInventory().setItemInMainHand(is);
|
||||
else
|
||||
p.getInventory().setItemInOffHand(is);
|
||||
p.getInventory().addItem(is);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren