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
public boolean onCommand(CommandSender sender, Command cmdObj, String lbl, String[] args) { | |
if (!(sender instanceof Player)) { | |
if (cmdObj.getName().equalsIgnoreCase("freeze")) { | |
if (args.length == 1) { | |
Player p = Bukkit.getPlayer(args[0]); | |
if (p != null) { | |
if (!p.hasPermission("freeze.immune") || p.hasPermission("freeze.immune")) { | |
sender.sendMessage("Froze " + p.getName() + " even his immune."); | |
} | |
} |
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 net.dkcraft.Punishment.commands; | |
import java.text.SimpleDateFormat; | |
import net.dkcraft.Punishment.Main; | |
import net.dkcraft.Punishment.util.ListStore; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandExecutor; | |
import org.bukkit.command.CommandSender; |
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
private static void freezePlayer(Player freeze, CommandSender cs, String message) { | |
Main.frozenPlayers.put(freeze.getName(), null); | |
freeze.sendMessage("§cYou have been frozen by a staff member. Reason: " + "§e" + message); | |
plugin.log.info(freeze.getName() + " was frozen by " + cs.getName() + " for reason: " + message); | |
cs.sendMessage("§a" + freeze.getName() + " §ehas been frozen."); | |
SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss"); | |
Main.punishmentLog.add("[" + format.format(System.currentTimeMillis()) + "] " + freeze.getName() + " was frozen by " + cs.getName() + " for reason: " + message); | |
Main.punishmentLog.save(); |
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
02.09 06:30:17 [Server] INFO Trusted: Skylet100 | |
02.09 06:30:12 [Server] SEVERE Reached end of stream for /173.255.233.106 | |
02.09 06:30:09 [Server] SEVERE Reached end of stream for /24.33.75.199 | |
02.09 06:29:46 [Server] INFO If you like the server, consider donating or voting for the server! | |
02.09 06:29:45 [Server] INFO Trusted: Skylet100 | |
02.09 06:29:14 [Server] INFO Trusted: Skylet100 | |
02.09 06:28:46 [Server] INFO Type /home <name>:home to visit homes | |
02.09 06:28:43 [Server] INFO Trusted: Skylet100 | |
02.09 06:28:21 [Server] SEVERE Reached end of stream for /94.231.109.64 | |
02.09 06:28:20 [Server] SEVERE Reached end of stream for /94.231.109.64 |
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
Enjin Debug Report generated on 2013/09/02 06:33:01 CDT | |
Enjin plugin version: 2.4.9 | |
Permissions plugin used: GroupManager version 2.0 (2.10.1) (Phoenix) | |
Vault permissions system reported: GroupManager | |
Votifier version: 1.9 | |
Bukkit version: git-Bukkit-1.5.2-R1.0-42-g3b7c805-b2831jnks (MC: 1.6.2) | |
Java version: 1.7.0_21 Oracle Corporation | |
Operating system: Linux 2.6.18-308.13.1.el5 amd64 | |
Plugins: |
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 onEntityDeath(EntityDeathEvent event) { | |
if (event.getEntity() instanceof Ageable) { | |
Ageable entity = (Ageable)event.getEntity(); | |
if (!entity.isAdult()) { | |
Bukkit.broadcastMessage("A baby died."); | |
} else { | |
Bukkit.broadcastMessage("An adult died."); | |
} | |
} |
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 net.bigbadcraft.bukkit; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Material; | |
import org.bukkit.entity.Ageable; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.entity.EntityDeathEvent; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.inventory.meta.ItemMeta; |
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 | |
private void onSmelt(FurnaceSmeltEvent event) { | |
ItemStack extractedItem = event.getSource(); | |
if (extractedItem.getItemMeta().getDisplayName().equals("Bacon!")) { | |
event.setResult(customItem(Material.GRILLED_PORK, 1, "Cooked Bacon!")); | |
} | |
} |
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 net.bigbadcraft.bukkit; | |
import java.io.File; | |
import java.io.IOException; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.player.PlayerJoinEvent; | |
import org.bukkit.event.player.PlayerQuitEvent; | |
import org.bukkit.plugin.java.JavaPlugin; |
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
public static void setPrefix(Player player, String prefix) { | |
prefix = ChatColor.translateAlternateColorCodes('&', prefix); | |
TitlePlugin.chat.setPlayerPrefix(player, WHITE + "[" + prefix + WHITE + "] " + RESET); | |
} |
OlderNewer