Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.14 KB | None | 0 0
  1. package hustler;
  2.  
  3. import java.sql.Connection;
  4. import java.sql.ResultSet;
  5. import java.sql.SQLException;
  6. import java.sql.Statement;
  7. import java.text.NumberFormat;
  8. import java.util.ArrayList;
  9. import java.util.HashMap;
  10. import java.util.List;
  11. import java.util.Locale;
  12. import java.util.Set;
  13.  
  14. import org.bukkit.Bukkit;
  15. import org.bukkit.Location;
  16. import org.bukkit.Material;
  17. import org.bukkit.Sound;
  18. import org.bukkit.World;
  19. import org.bukkit.block.Block;
  20. import org.bukkit.command.Command;
  21. import org.bukkit.command.CommandSender;
  22. import org.bukkit.enchantments.Enchantment;
  23. import org.bukkit.entity.Player;
  24. import org.bukkit.event.EventHandler;
  25. import org.bukkit.event.EventPriority;
  26. import org.bukkit.event.Listener;
  27. import org.bukkit.event.block.Action;
  28. import org.bukkit.event.block.BlockBreakEvent;
  29. import org.bukkit.event.player.PlayerChangedWorldEvent;
  30. import org.bukkit.event.player.PlayerInteractEvent;
  31. import org.bukkit.event.player.PlayerLoginEvent;
  32. import org.bukkit.event.player.PlayerMoveEvent;
  33. import org.bukkit.inventory.ItemStack;
  34. import org.bukkit.inventory.meta.ItemMeta;
  35. import org.bukkit.plugin.PluginManager;
  36. import org.bukkit.plugin.java.JavaPlugin;
  37. import org.bukkit.potion.PotionEffect;
  38. import org.bukkit.potion.PotionEffectType;
  39.  
  40.  
  41.  
  42. public class ParkorMain extends JavaPlugin implements Listener {
  43. public String ip = SecurityPlus.getIP();
  44. public String port = SecurityPlus.getPort();
  45. public String database = SecurityPlus.getDataBase();
  46. public String username = SecurityPlus.getUsername();
  47. public String password = SecurityPlus.getPassword();
  48.  
  49.  
  50.  
  51. public MySQL MySQL = new MySQL(ip, port, database, username, password);
  52. Connection c = null;
  53. public ArrayList<String> playeramount = new ArrayList<String>();
  54. public void onEnable() {
  55. PluginManager manager = this.getServer().getPluginManager();
  56. manager.registerEvents(this, this);
  57. try{
  58. c = MySQL.openConnection();
  59. c.createStatement().execute("CREATE TABLE IF NOT EXISTS `parkourCheckPoints` (`ID` int(32) NOT NULL AUTO_INCREMENT,`lvl` int(36),`x` int(36), `y` int(36), `z` int(36),`world` varchar(36),`yaw` float, PRIMARY KEY (`ID`))");
  60. c.createStatement().execute("CREATE TABLE IF NOT EXISTS `parkourPlayers` (`ID` int(32) NOT NULL AUTO_INCREMENT, `PLAYER` varchar(36), `UUID` varchar(36),`lvl` int(36),`deaths` int(36), PRIMARY KEY (`ID`))");
  61. // File file = new File(getDataFolder(), "config.yml");
  62. // if (!file.exists()) {
  63. // saveDefaultConfig();
  64. // }
  65. // saveConfig();
  66. } catch (ClassNotFoundException | SQLException e) {
  67. // TODO Auto-generated catch block
  68. e.printStackTrace();
  69. }
  70.  
  71. }
  72. public boolean checkPlayer(Player p){
  73. String uuid = p.getUniqueId().toString();
  74. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  75. try{
  76. Statement statement = c.createStatement();
  77. ResultSet getnumbers = statement.executeQuery("SELECT * FROM parkourPlayers WHERE UUID ='"+uuid+"';");
  78. playeramount.clear();
  79. while(getnumbers.next()){
  80. String winningL10 = getnumbers.getString("PLAYER");
  81. playeramount.add(winningL10);
  82. } c.close();
  83. }catch (SQLException e) {
  84. e.printStackTrace(); }
  85. if(playeramount.size()>=1){
  86. return false; }
  87. else{return true;} }
  88.  
  89. @EventHandler
  90. public void event(PlayerChangedWorldEvent e) {
  91. Player player = e.getPlayer();
  92.  
  93.  
  94. if ((player.getWorld().getName().equals("parkor"))) {
  95. player.getInventory().setChestplate(new ItemStack(Material.AIR));;
  96. }
  97.  
  98. }
  99.  
  100.  
  101.  
  102.  
  103. public HashMap<Player, Boolean> stopspam = new HashMap<Player, Boolean>();
  104.  
  105. HashMap<Player,Long> cooldowns = new HashMap<Player,Long>();
  106. public boolean hasCooldown(Player player){
  107. int seconds = 5;
  108. if(cooldowns.get(player) < (System.currentTimeMillis() - seconds*1000))
  109. return false;
  110. else
  111. return true;
  112. }
  113. /* @EventHandler
  114. public void onEChestClick(PlayerMoveEvent e) {
  115. Player p = e.getPlayer();
  116.  
  117. if(e.getPlayer().getLocation().add(0,-1,0).getBlock().getType().equals(Material.DAYLIGHT_DETECTOR)||e.getPlayer().getLocation().add(0,-1,0).getBlock().getType().equals(Material.DAYLIGHT_DETECTOR_INVERTED)){
  118. if(stopspam.get(p) == Boolean.FALSE){
  119. stopspam.put(p, Boolean.TRUE);
  120. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  121. @Override
  122. public void run() {
  123. stopspam.put(p, Boolean.FALSE);
  124. }
  125. }, 300L);
  126. getCheckPoints();
  127.  
  128. for (int i = 0; i < points.size(); i++){
  129.  
  130. if(points.get(i).distance(e.getPlayer().getLocation())<5){
  131.  
  132. int newlvl = getlvl(points.get(i).getBlockX(),points.get(i).getBlockZ());
  133. p.sendMessage("New Check Point: "+ newlvl);
  134. changelvl(e.getPlayer(),newlvl);
  135. }
  136. }
  137.  
  138. }
  139. }
  140.  
  141.  
  142.  
  143.  
  144. }
  145.  
  146. */
  147.  
  148.  
  149. public HashMap<Player, Boolean> stopspam1 = new HashMap<Player, Boolean>();
  150.  
  151. @EventHandler
  152. public void beaconTPER(PlayerMoveEvent e) throws SQLException {
  153. Player p = e.getPlayer();
  154.  
  155. if(e.getPlayer().getLocation().add(0,-1,0).getBlock().getType().equals(Material.BEACON)){
  156. if(p.getWorld().getName().equals("parkor")){
  157. if(stopspam1.get(p) == Boolean.FALSE){
  158. stopspam1.put(p, Boolean.TRUE);
  159.  
  160. changelvl(p,getlvl(p)+1);
  161. int blah = getlvl(p);
  162. resume(p);
  163. c.close();
  164. Bukkit.broadcastMessage("§3"+p.getName()+" §7Advanced to Parkour Level: §4§l"+blah);
  165. Bukkit.dispatchCommand(Bukkit.getServer().getConsoleSender(),"coins give "+ p.getName()+" 250");
  166. p.sendMessage("§7You were given §3250 §4Shards§7 for completing the level.");
  167. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  168. @Override
  169. public void run() {
  170. stopspam1.put(p, Boolean.FALSE);
  171.  
  172.  
  173. }
  174. }, 300L);
  175.  
  176.  
  177.  
  178. }}
  179. }
  180.  
  181.  
  182.  
  183.  
  184. }
  185.  
  186.  
  187. @EventHandler
  188. public void portal(PlayerMoveEvent e){
  189. Player p = e.getPlayer();
  190. Block block = e.getPlayer().getLocation().getBlock();
  191. if(block.getType().equals(Material.PORTAL)){
  192. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.DIAMOND_BLOCK)){p.teleport(block.getLocation().add(0.5,10,.5));
  193. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);
  194. }
  195. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.IRON_BLOCK)){p.teleport(block.getLocation().add(-5.5,0,.5));
  196. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);}
  197. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.GOLD_BLOCK)){p.teleport(block.getLocation().add(6.5,0,.5));
  198. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);}
  199. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.LAPIS_BLOCK)){p.teleport(block.getLocation().add(.5,0,6.5));
  200. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);}
  201. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.COAL_BLOCK)){p.teleport(block.getLocation().add(.5,0,-5.5));
  202. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);}
  203. if(block.getLocation().add(0,-1,0).getBlock().getType().equals(Material.EMERALD_BLOCK)){p.teleport(block.getLocation().add(.5,-10,.5));
  204. p.playSound(p.getLocation(), Sound.ENTITY_BAT_TAKEOFF, 20, 0);}
  205.  
  206.  
  207. }}
  208.  
  209.  
  210.  
  211.  
  212.  
  213. public int deaths;
  214. @EventHandler
  215. public void lava(PlayerMoveEvent e) throws SQLException {
  216. Player p = e.getPlayer();
  217.  
  218. if(e.getPlayer().getLocation().getBlock().getType().equals(Material.LAVA)||e.getPlayer().getLocation().getBlock().getType().equals(Material.STATIONARY_LAVA)){
  219. resume(p);
  220. adddeath(p);
  221. deaths = getdeath(p);
  222. p.sendMessage("§4§lDEATHS: §7§l"+ NumberFormat.getNumberInstance(Locale.US).format(deaths));
  223.  
  224. if(deaths== 1){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Had his §4First Death!"); }
  225. if(deaths== 5){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Had his §4Fifth Death!"); }
  226. if(deaths== 10){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Had his §4Tenth Death!"); }
  227. if(deaths== 25){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §425§7 Times!"); }
  228. if(deaths== 50){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §450§7 Times!"); }
  229. if(deaths== 100){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4100§7 Times!"); }
  230. if(deaths== 125){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4125§7 Times!"); }
  231. if(deaths== 150){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4150§7 Times!"); }
  232. if(deaths== 175){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4175§7 Times!"); }
  233. if(deaths== 200){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4200§7 Times!"); }
  234. if(deaths== 250){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4250§7 Times!"); }
  235. if(deaths== 300){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4300§7 Times!"); }
  236. if(deaths== 350){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4350§7 Times!"); }
  237. if(deaths== 400){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4400§7 Times!"); }
  238. if(deaths== 450){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4450§7 Times!"); }
  239. if(deaths== 500){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4500§7 Times!"); }
  240. if(deaths== 600){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4600§7 Times!"); }
  241. if(deaths== 700){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4700§7 Times!"); }
  242. if(deaths== 800){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4800§7 Times!"); }
  243. if(deaths== 900){Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §4900§7 Times!"); }
  244. if(deaths== 1000){ Bukkit.broadcastMessage("§3"+p.getName()+"§7 Has Died §41000§7 Times!"); }
  245.  
  246. c.close();
  247.  
  248. }
  249.  
  250.  
  251.  
  252.  
  253. }
  254.  
  255.  
  256.  
  257. public int alldeaths;
  258. public int getalldeaths(){
  259. alldeaths = 0;
  260. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  261. try{
  262. Statement statementshards = c.createStatement();
  263. ResultSet servershards = statementshards.executeQuery("SELECT * FROM parkourPlayers;");
  264. while(servershards.next()){
  265.  
  266. int add = servershards.getInt("deaths");
  267. alldeaths =alldeaths + add;
  268. }
  269. c.close();
  270.  
  271. }catch (SQLException e) {
  272. e.printStackTrace(); }
  273.  
  274. return alldeaths;
  275. }
  276.  
  277.  
  278.  
  279.  
  280. public int getthelvl;
  281. public int getlvl(int x ,int z){
  282. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  283. try{
  284. Statement statement1 = c.createStatement();
  285. ResultSet playernotreg = statement1.executeQuery("SELECT * FROM parkourCheckPoints WHERE (x=" + x + ") AND (z = "+z+");");
  286. playernotreg.next();
  287. getthelvl = playernotreg.getInt("lvl");
  288. c.close();
  289.  
  290. }catch (SQLException e) {
  291. e.printStackTrace(); }
  292. return getthelvl;
  293. }
  294.  
  295.  
  296.  
  297. public ArrayList<Location> points = new ArrayList<Location>();
  298. public void getCheckPoints(){
  299. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  300. try{
  301. points.clear();
  302. Statement statementshards = c.createStatement();
  303. ResultSet servershards = statementshards.executeQuery("SELECT * FROM parkourCheckPoints;");
  304. int x;
  305. int y;
  306. int z;
  307. String worldname;
  308. while (servershards.next()){
  309. worldname = servershards.getString("world");
  310. x = servershards.getInt("x");
  311. y = servershards.getInt("y");
  312. z = servershards.getInt("z");
  313. World world= Bukkit.getWorld(worldname);
  314. Location thisloc = new Location (world,x,y,z);
  315.  
  316.  
  317. points.add(thisloc);
  318.  
  319.  
  320. }
  321.  
  322.  
  323.  
  324.  
  325. c.close();
  326. }catch (SQLException e) {
  327. e.printStackTrace(); }
  328. }
  329.  
  330.  
  331.  
  332.  
  333. @EventHandler
  334. public void onEChestClick(PlayerLoginEvent e) {
  335. stopspam1.put(e.getPlayer(), Boolean.FALSE);
  336. //getalldeaths();
  337.  
  338.  
  339. Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), "holograms setline park 4 §7[§8§m----§4§l"+NumberFormat.getNumberInstance(Locale.US).format(getalldeaths())+"§8§m----§7]");
  340.  
  341. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
  342. @Override
  343. public void run() {
  344. Location loc = e.getPlayer().getLocation();
  345. World world = e.getPlayer().getWorld();
  346. world.strikeLightningEffect(loc);
  347. e.getPlayer().setAllowFlight(true);;
  348. e.getPlayer().setFlying(true);
  349.  
  350. }
  351. }, 20L);
  352.  
  353. }
  354. public void addPlayer(String p, String uuid, int lvl){
  355. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  356.  
  357. try{
  358. Statement statement1 = c.createStatement();
  359. // `PLAYER` varchar(36), `UUID` varchar(36),`lvl` int(36),`time` int(36), `x` int(36), `y` int(36), `z` int(36),`world` varchar(36), PRIMARY KEY (`ID`))");
  360. String add = "INSERT INTO `parkourPlayers`(`PLAYER`,`UUID`,`lvl`,`deaths`) VALUES ('" + p + "','" + uuid + "','" + lvl + "','" + 0 + "')";
  361. statement1.execute(add);
  362. c.close();
  363. }catch (SQLException e) {
  364. e.printStackTrace(); }
  365.  
  366. }
  367. void changelvl(Player p, int lvl){
  368. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  369.  
  370. try{
  371. Statement statement2 = c.createStatement();
  372.  
  373.  
  374. String hasreg = ("UPDATE `parkourPlayers` SET `lvl`= '"+lvl+"' WHERE UUID ='" + p.getUniqueId().toString() + "';");
  375. statement2.execute(hasreg);
  376. c.close();
  377. }catch (SQLException e) {
  378. e.printStackTrace(); }
  379. }
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388. public void addCheckpoint(int lvl,int x,int y,int z,String world,float yaw){
  389. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  390.  
  391. try{
  392. Statement statement1 = c.createStatement();
  393. // `PLAYER` varchar(36), `UUID` varchar(36),`lvl` int(36),`time` int(36), `x` int(36), `y` int(36), `z` int(36),`world` varchar(36), PRIMARY KEY (`ID`))");
  394. String add = "INSERT INTO `parkourCheckPoints`(`lvl`,`x`,`y`,`z`,`world`,`yaw`) VALUES ('" + lvl + "','" + x + "','" + y + "','" + z + "','" + world + "','" + yaw + "')";
  395. statement1.execute(add);
  396. c.close();
  397. }catch (SQLException e) {
  398. e.printStackTrace(); }
  399.  
  400. }
  401. public int thelvl;
  402. public int getlvl(Player p){
  403. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  404. try{
  405.  
  406. Statement statementshards = c.createStatement();
  407. ResultSet servershards = statementshards.executeQuery("SELECT * FROM parkourPlayers WHERE UUID ='"+p.getUniqueId().toString()+"';");
  408. servershards.next();
  409. thelvl = servershards.getInt("lvl");
  410. c.close();
  411.  
  412. }catch (SQLException e) {
  413. e.printStackTrace(); }
  414. return thelvl;
  415. }
  416.  
  417. public void adddeath(Player p){
  418. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  419.  
  420. try{
  421. Statement statement2 = c.createStatement();
  422.  
  423. int count = getdeath(p)+1;
  424. String hasreg = ("UPDATE `parkourPlayers` SET `deaths`= '"+count+"' WHERE UUID ='" + p.getUniqueId().toString() + "';");
  425. statement2.execute(hasreg);
  426.  
  427.  
  428. }catch (SQLException e) {
  429. e.printStackTrace(); }
  430.  
  431.  
  432.  
  433. }
  434. public int pdeaths;
  435. public int getdeath(Player p){
  436.  
  437. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  438. try{
  439.  
  440. Statement statementshards = c.createStatement();
  441. ResultSet servershards = statementshards.executeQuery("SELECT * FROM parkourPlayers WHERE UUID ='"+p.getUniqueId().toString()+"';");
  442. servershards.next();
  443. pdeaths = servershards.getInt("deaths");
  444.  
  445.  
  446. }catch (SQLException e) {
  447. e.printStackTrace(); }
  448. return pdeaths;
  449.  
  450.  
  451.  
  452.  
  453. }
  454.  
  455. public void resume(Player p){
  456. try {c = MySQL.openConnection();} catch (ClassNotFoundException | SQLException e1) {e1.printStackTrace();}
  457. try{
  458. Statement statementshards = c.createStatement();
  459. ResultSet servershards = statementshards.executeQuery("SELECT * FROM parkourPlayers WHERE UUID ='"+p.getUniqueId().toString()+"';");
  460. servershards.next();
  461. int thelvl = servershards.getInt("lvl");
  462. Statement statementshards2 = c.createStatement();
  463. ResultSet servershards2 = statementshards2.executeQuery("SELECT * FROM parkourCheckPoints WHERE lvl ="+thelvl+";");
  464. servershards2.next();
  465. String worldname;
  466.  
  467.  
  468. worldname = servershards2.getString("world");
  469. int x = servershards2.getInt("x");
  470. int y = servershards2.getInt("y");
  471. int z = servershards2.getInt("z");
  472. float yaw =servershards2.getFloat("yaw");
  473. World world= Bukkit.getWorld(worldname);
  474. Location theloc = new Location(world,x+.5,y,z+.5,yaw,0);
  475. p.teleport(theloc);
  476.  
  477.  
  478. }catch (SQLException e) {
  479. e.printStackTrace(); }
  480. }
  481.  
  482.  
  483.  
  484. public void start(Player p) throws SQLException{
  485. if(!checkPlayer(p)){
  486. resume(p);
  487. p.sendMessage("§7Resuming to last §4Checkpoint!");
  488. c.close();
  489. }
  490. else{
  491. p.sendMessage("§7Sending you to §4Level 1! §7Good Luck!");
  492. addPlayer(p.getName(),p.getUniqueId().toString(),1);
  493. resume(p);
  494. c.close();
  495. }
  496. }
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  508.  
  509. if ((cmd.getName().equalsIgnoreCase("addcheckpoint"))&& sender.hasPermission("admin")) {
  510. if (args.length == 1) {
  511. Player p = (Player) sender;
  512. String pname = p.getName();
  513. addCheckpoint(Integer.valueOf(args[0]),p.getLocation().getBlockX(),p.getLocation().getBlockY(),p.getLocation().getBlockZ(),p.getWorld().getName(),p.getLocation().getYaw());
  514.  
  515.  
  516. }
  517. }
  518. if ((cmd.getName().equalsIgnoreCase("parkour"))) {
  519. if (args.length == 0) {
  520. Player p = (Player) sender;
  521. String pname = p.getName();
  522. try {
  523. start(p);
  524. } catch (SQLException e) {
  525. // TODO Auto-generated catch block
  526. e.printStackTrace();
  527. }
  528. p.setFlying(false);
  529. } }
  530.  
  531. if ((cmd.getName().equalsIgnoreCase("portal"))&& sender.hasPermission("admin")) {
  532. if (args.length == 1) {
  533. ItemStack item = new ItemStack(Material.PORTAL);
  534.  
  535. Player p = (Player) sender;
  536. Location looking = p.getTargetBlock((Set<Material>) null, 6).getLocation();
  537. if(looking.getBlock().getType().equals(Material.STONE)||looking.getBlock().getType().equals(Material.PORTAL)){
  538. if(args[0].contains("2")){
  539. looking.getBlock().setTypeIdAndData(90, (byte)2, true);}
  540.  
  541. if(args[0].contains("1")){
  542. looking.getBlock().setTypeIdAndData(90, (byte)1, true);}
  543.  
  544. }
  545. }}
  546.  
  547. return true; }
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement