Advertisement
peacestorm

Sign functions

Mar 7th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function useItem(x, y, z, itemId, blockId, side, itemDamage) {
  2. if(Level.getSignText(x, y, z, 0) == "[Teleport]") {
  3. Entity.setPosition(Player.getEntity(), Level.getSignText(x, y, z, 1), Level.getSignText(x, y, z, 2), Level.getSignText(x, y, z, 3));
  4. }
  5.  
  6. if(Level.getSignText(x, y, z, 0) == "[Gamemode]") {
  7. Level.setGameMode(Level.getSignText(x, y, z, 1));
  8. }
  9.  
  10. if(Level.getSignText(x, y, z, 0) == "[Item]") {
  11. //code for giving the item here
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement