This file contains 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
{ | |
"text": "Want to get a diamond?", | |
"extra": [ | |
{ | |
"text": "Click here!", | |
"clickEvent": { | |
"action": "run_command", |
This file contains 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
if (hasGroup (e.getPlayer().getWorld().toString(), CalculableType.USER, e.getPlayer().getName(), "admin")) { | |
e.setFormat("\u2756" + e.getMessage()); | |
} | |
else { | |
Bukkit.broadcastMessage("HI"); | |
} | |
if (hasGroup (e.getPlayer().getWorld().toString(), CalculableType.USER, e.getPlayer().getName(), "moderator")) { | |
e.setFormat("Hi:" + e.getMessage()); | |
} | |
String[] a = getGroups(e.getPlayer().getWorld().toString(), CalculableType.USER, e.getPlayer().getName()); |
This file contains 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
@Override | |
public void onEnd() { | |
Bukkit.broadcastMessage(ChatColor.DARK_PURPLE + "############"); | |
Bukkit.broadcastMessage(ChatColor.GREEN + "The match has started!"); | |
Bukkit.broadcastMessage(ChatColor.DARK_PURPLE + "############"); | |
TeamModule teamModule = (TeamModule) MatchHandler.getCurrentMatch().getModule("TeamModule"); | |
List<MapTeam> teams = teamModule.getAllTeams(); | |
for (MapTeam t : teams){ | |
for (Player p : t.getPlayers()){ | |
Location loc = SpawnUtils.handleSpawn(p); |
This file contains 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
@Override | |
public void onPacketReceive(PacketReceiveEvent event) { | |
Packet packet = event.getPacket(); | |
packet.accept(visitor); | |
if (packet.getId() == 3){ | |
PacketChat pc = (PacketChat) event.getPacket(); | |
if (pc.getMessage().equalsIgnoreCase("test message")){ | |
say("Recived"); | |
System.out.print("TESTTTYTT"); | |
} |
This file contains 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); | |
} |
This file contains 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 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 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 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 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); | |
} | |
} |
OlderNewer