Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. var mineflayer = require('mineflayer');
  2. var blocks = [];
  3. var master = "TheTechPony"
  4.  
  5. var bot = mineflayer.createBot({
  6. host: '', // 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(message)
  18. });
  19.  
  20. bot.on('spawn', function() {
  21. console.log('Spawned');
  22. bot.chat("/msg TheTechPony Current admins: " + master);
  23. });
  24.  
  25. function myFunction(x,y,z) {
  26. var blockpos = x + ", " + y + ", " + z;
  27. blocks.push(blockpos);
  28. blocks.forEach(function(item, index, array) {
  29. console.log(item);
  30. });
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement