Atticool

Untitled

Jan 19th, 2023
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 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. import crafttweaker.command.ICommandManager;
  11. import crafttweaker.block.IBlock;
  12. import crafttweaker.block.IBlockDefinition;
  13. import crafttweaker.event.PlayerInteractBlockEvent;
  14. import crafttweaker.command.ICommandSender;
  15.  
  16. events.onPlayerInteractBlock(
  17. function(event as crafttweaker.event.PlayerInteractBlockEvent) {
  18. if (event.block.definition.id == "minecraft:bed") {
  19. event.player.executeCommand('say I Feel Rested');
  20. event.player.executeCommand('effect @p regeneration 10 255');
  21. }
  22. }
  23. );
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment