forked from SteamWar/SteamWar
Add TutorialSystem module
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package de.steamwar.tutorial.commands;
|
||||
|
||||
import de.steamwar.command.SWCommand;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class UnsignCommand extends SWCommand {
|
||||
|
||||
public UnsignCommand() {
|
||||
super("unsign");
|
||||
}
|
||||
|
||||
@Register
|
||||
public void unsignCommand(Player p) {
|
||||
ItemStack itemStack = p.getInventory().getItemInMainHand();
|
||||
if (itemStack.getType() != Material.WRITTEN_BOOK) return;
|
||||
itemStack.setType(Material.WRITABLE_BOOK);
|
||||
p.getInventory().setItemInMainHand(itemStack);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user