mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Converted emulated player class calls to use base class.
This commit is contained in:
parent
e007331581
commit
36e580474f
61 changed files with 214 additions and 214 deletions
|
@ -19,7 +19,7 @@ public class Commandbook extends EssentialsCommand
|
|||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
final ItemStack item = user.getItemInHand();
|
||||
final ItemStack item = user.getBase().getItemInHand();
|
||||
final String player = user.getName();
|
||||
if (item.getType() == Material.WRITTEN_BOOK)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ public class Commandbook extends EssentialsCommand
|
|||
{
|
||||
ItemStack newItem = new ItemStack(Material.BOOK_AND_QUILL, item.getAmount());
|
||||
newItem.setItemMeta(bmeta);
|
||||
user.setItemInHand(newItem);
|
||||
user.getBase().setItemInHand(newItem);
|
||||
user.sendMessage(tl("editBookContents"));
|
||||
}
|
||||
else
|
||||
|
@ -75,7 +75,7 @@ public class Commandbook extends EssentialsCommand
|
|||
}
|
||||
ItemStack newItem = new ItemStack(Material.WRITTEN_BOOK, item.getAmount());
|
||||
newItem.setItemMeta(bmeta);
|
||||
user.setItemInHand(newItem);
|
||||
user.getBase().setItemInHand(newItem);
|
||||
user.sendMessage(tl("bookLocked"));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue