Neues Inventarhandling #301
@ -29,16 +29,19 @@ import java.util.Set;
|
||||
|
||||
public class BlockIdWrapper8 implements BlockIdWrapper.IBlockIdWrapper {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int blockToId(Block block) {
|
||||
return block.getTypeId() << 4 + block.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setBlock(World world, int x, int y, int z, int blockState) {
|
||||
world.getBlockAt(x, y, z).setTypeIdAndData(blockState >> 4, (byte)(blockState & 0b1111), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public Set<Integer> getHiddenBlockIds() {
|
||||
Set<Integer> hiddenBlockIds = new HashSet<>();
|
||||
for(String tag : Config.HiddenBlocks){
|
||||
@ -48,6 +51,7 @@ public class BlockIdWrapper8 implements BlockIdWrapper.IBlockIdWrapper {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getObfuscateWith() {
|
||||
return Material.matchMaterial(Config.ObfuscateWith).getId() << 4;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class GUI {
|
||||
anvilInv.setItem(Material.LEATHER_CHESTPLATE);
|
||||
anvilInv.setCallback(s -> {
|
||||
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
|
||||
if(PersonalKit.nameInUse(user.getId(), Config.SchematicType.toDB(), s)) {
|
||||
if(PersonalKit.get(user.getId(), Config.SchematicType.toDB(), s).isInUse()) {
|
||||
msg.sendPrefixless("KITNAME_IN_USE", p, ChatMessageType.ACTION_BAR);
|
||||
p.closeInventory();
|
||||
return;
|
||||
|
@ -41,6 +41,8 @@ public class ItemBuilder {
|
||||
item = new ItemStack(matrial, amount);
|
||||
meta = item.getItemMeta();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public ItemBuilder(Material matrial, short subid) {
|
||||
item = new ItemStack(matrial, 1, subid);
|
||||
meta = item.getItemMeta();
|
||||
|
1
pom.xml
1
pom.xml
@ -24,6 +24,7 @@
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<compilerArgs>-Xlint</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren