Atticool

Untitled

Jan 19th, 2023
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. import crafttweaker.item.IItemStack;
  2. import crafttweaker.events.IEventManager;
  3. import crafttweaker.event.PlayerTickEvent;
  4. import crafttweaker.player.IPlayer;
  5. import crafttweaker.entity.IEntityLivingBase;
  6. import crafttweaker.potions.IPotion;
  7. import crafttweaker.potions.IPotionEffect;
  8. import crafttweaker.item.IItemDefinition;
  9. import crafttweaker.command.ICommand;
  10.  
  11.  
  12. import crafttweaker.event.PlayerInteractBlockEvent;
  13. import crafttweaker.command.ICommandSender;
  14.  
  15. /* old script
  16. events.onPlayerInteractBlock;
  17. if(event.block.id == <minecraft:bed>) {
  18. Commands.call('say I Feel Rested', player, world, true, false);
  19. Commands.call('effect @p regeneration 10 255', player, world, true, false);
  20. }
  21. */
  22.  
  23. events.onPlayerInteractBlock(function(event as crafttweaker.event.PlayerInteractBlockEvent){
  24. if(event.block.id == <minecraft:bed>) {
  25. Commands.call('say I Feel Rested', player, world, true, false);
  26. Commands.call('effect @p regeneration 10 255', player, world, true, false);
  27. }});
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment