This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected class ThreadParse extends AsyncTask<String, String, String>{ | |
| public void parsePage(String link){ | |
| try { | |
| doc = Jsoup.connect(link).userAgent("Mozilla").get(); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| Toast.makeText(Thread.this, "Something went wrong! Are you sure you're online?", Toast.LENGTH_LONG).show(); | |
| return; | |
| } | |
| Element e = doc.getElementsByClass("span9").get(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try { | |
| doc = Jsoup.connect("http://oc.tc/forums").userAgent("Mozilla").get(); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| Toast.makeText(Forum.this, "Something went wrong! Are you sure you're online?", Toast.LENGTH_LONG).show(); | |
| return; | |
| } | |
| Elements topics = doc.getElementsByClass("topic"); | |
| for (int i = 0; i < topics.size(); i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EventHandler | |
| public void showObsInv(final PlayerInteractEntityEvent event){ | |
| if (!(event.getRightClicked() instanceof Player)){ | |
| return; | |
| } | |
| Player clicker = event.getPlayer(); | |
| Player clickee = (Player) event.getRightClicked(); | |
| clicker.openInventory(obsInvPreview(clicker, clickee.getInventory())); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EventHandler | |
| public void onPlayerDeath(PlayerDeathEvent event) { | |
| List<ItemStack> itemStackL = event.getDrops(); | |
| List<ItemStack> itemsToDelete = new ArrayList<>(); | |
| for (ItemStack i : itemStackL){ | |
| if (i != null){ | |
| for (ItemStack i2 : Scrimmage.getRotation().getSlot().getMap().getItemRemove()){ | |
| if (i2 != null){ | |
| if (i.isSimilar(i2)){ | |
| itemsToDelete.add(i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<ItemStack> itemStackL = event.getDrops(); | |
| for (ItemStack i : itemStackL){ | |
| if (i != null){ | |
| for (ItemStack i2 : Scrimmage.getRotation().getSlot().getMap().getItemRemove()){ | |
| if (i2 != null){ | |
| if (i.isSimilar(i2)){ | |
| event.getDrops().remove(i); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ItemStack stick = new ItemStack(Material.STICK); | |
| stick.getItemMeta().setDisplayName(ChatColor.AQUA + event.getPlayer().getDisplayName() + "'s wand"); | |
| event.getPlayer().getInventory().addItem(stick); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @EventHandler | |
| public void onRespawn(PlayerRespawnEvent e){ | |
| e.getPlayer().teleport(new Location(PizzaSpleef.get().getServer().getWorld("Lobby"), -17, 72, -69, 2, 180)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.masterejay.pizzaspleef.commands; | |
| import com.sk89q.minecraft.util.commands.Command; | |
| import com.sk89q.minecraft.util.commands.CommandContext; | |
| import com.sk89q.minecraft.util.commands.CommandException; | |
| import me.masterejay.pizzaspleef.PizzaSpleef; | |
| import me.masterejay.pizzaspleef.utils.Cuboid; | |
| import org.bukkit.Bukkit; | |
| import org.bukkit.ChatColor; | |
| import org.bukkit.Location; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for(int i = 0 ; i < 20 ; i++) { | |
| int radius = 30; | |
| int max = 10; | |
| double x = (Math.random() * (max * 2)) - max; | |
| double y = 0; | |
| double z = (Math.random() * (max * 2)) - max; | |
| int x1 = (int) x; | |
| int z1 = (int) z; | |
| double center_x = -17; | |
| int center_z = -13; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Location location = p.getLocation(); | |
| for(int i = 0 ; i < 20 ; i++) { | |
| int max = 10; | |
| double x = Math.random() * (max * 2) - max; | |
| double y = 0; | |
| double z = Math.random() * (max * 2) - max; | |
| location.add(x,y,z); | |
| p.teleport(location); | |
| } |