Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. var mineflayer = require('mineflayer');
  2. var blocks = [];
  3. var master = "TheTechPony"
  4.  
  5. var bot = mineflayer.createBot({
  6. host: 'slowblockz.mc.gg', // optional
  7. username: '', // email and password are required only for
  8. password: '', // online-mode=true servers
  9. version: "1.12",
  10. });
  11.  
  12. bot.chatAddPattern(/^\[.*?(\w*) -> me \] (.*)$/, "whisper", "essentials whisper");
  13. console.log('TTPB: Loaded patterns');
  14.  
  15. bot.on("chat", function(username, message) {
  16. console.log('Chat');
  17. bot.chat("/msg TheTechPony Test");
  18. });
  19. bot.on('message', msg => console.log(msg.toString()))
  20.  
  21. bot.on('spawn', function() {
  22. console.log('Spawned');
  23. bot.chat("/msg TheTechPony Current admins: " + master);
  24. });
  25.  
  26. function scheduleDig(x,y,z) {
  27. var blockpos = x + ", " + y + ", " + z;
  28. blocks.push(blockpos);
  29. blocks.forEach(function(item, index, array) {
  30. console.log(item);
  31. });
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement