Switch over various components
This commit is contained in:
parent
45796de812
commit
4437104c19
73 changed files with 202 additions and 2516 deletions
|
@ -4,12 +4,13 @@ package dev.zontreck.otemod.items;
|
|||
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||
import dev.zontreck.libzontreck.items.lore.LoreContainer;
|
||||
import dev.zontreck.libzontreck.items.lore.LoreEntry;
|
||||
import dev.zontreck.libzontreck.profiles.Profile;
|
||||
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
|
||||
import dev.zontreck.libzontreck.util.ChatHelpers;
|
||||
import dev.zontreck.otemod.OTEMod;
|
||||
import dev.zontreck.otemod.chat.ChatServerOverride;
|
||||
import dev.zontreck.otemod.configs.OTEServerConfig;
|
||||
import dev.zontreck.otemod.events.LoreHandlers;
|
||||
import dev.zontreck.otemod.implementation.profiles.Profile;
|
||||
import dev.zontreck.otemod.implementation.profiles.UserProfileNotYetExistsException;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -56,12 +57,12 @@ public class VaultItem extends Item
|
|||
{
|
||||
if(p.available_vaults >= OTEServerConfig.MAX_VAULTS.get())
|
||||
{
|
||||
ChatServerOverride.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Red!You cannot activate anymore vaults due to the maximum set by the server admin")), OTEMod.THE_SERVER);
|
||||
ChatHelpers.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Red!You cannot activate anymore vaults due to the maximum set by the server admin")), OTEMod.THE_SERVER);
|
||||
return InteractionResultHolder.pass(is);
|
||||
} else {
|
||||
p.available_vaults++;
|
||||
p.commit();
|
||||
ChatServerOverride.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults")), OTEMod.THE_SERVER);
|
||||
ChatHelpers.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults")), OTEMod.THE_SERVER);
|
||||
pPlayer.setItemInHand(pUsedHand, new ItemStack(Items.AIR));
|
||||
|
||||
return InteractionResultHolder.consume(is);
|
||||
|
@ -69,7 +70,7 @@ public class VaultItem extends Item
|
|||
}else {
|
||||
p.available_vaults++;
|
||||
p.commit();
|
||||
ChatServerOverride.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults")), OTEMod.THE_SERVER);
|
||||
ChatHelpers.broadcastTo(pPlayer.getUUID(), new TextComponent(ChatColor.doColors(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults")), OTEMod.THE_SERVER);
|
||||
pPlayer.setItemInHand(pUsedHand, new ItemStack(Items.AIR));
|
||||
|
||||
return InteractionResultHolder.consume(is);
|
||||
|
|
Reference in a new issue