Why is encapsulation important in this case? @Skionz Both ways work, from what I can see. Unless you know of a reason why one way is preferable...
Correct me if I'm wrong, but if you remove the static, you will not be able to access it. Edit.: Especially since a static method would also...
Your question is very similar to this one. Check it out. Feel free to reply if you still don't know what to do.
If there are always only two players, you can use that. However, if there can be more/less, use this: public static void endGame() { for(Player...
Make it a public static variable and you can access it from pretty much anywhere using <class>.<variable>....
Thanks, clarified. Inside Location.java: /** * Constructs a new {@link Vector} based on this Location * * @return New Vector...
Since you don't know how HashMaps works, you should learn about them. You will definitely need them sometime. I think making an ArrayList of...
That, and I think Server#getWorld(String) is case-sensitive, so it'd have to be getWorld("world") and not getWorld("World"), if your world name is...
public static void setupRefreshNavSG() { new BukkitRunnable() { public void run() { for (Player p :...
http://bukkit.org/threads/make-a-chest-like-its-open.153414/ http://bukkit.org/threads/show-players-visual-chest-open-close-effect.118488/
Remove the this. . My bad.
HashMap<UUID, UUID> a = new HashMap<UUID, UUID>(); That means you'll need to use a.put(UUID here, UUID here); HashMap<UUID, String> a = new...
@jcbjoe And it's doing that: if(is.getType() == Material.DIAMOND) { amount += is.getAmount(); } else...
@HexLazer205 I know I said UUID, but you can use the actual players since they have to relog to change username. The key is one Player object,...
HashMap<UUID, UUID> lastSentMessages = new HashMap<UUID, UUID>(); The key (the first entry) is the sender, the value (the second entry) is the...
package me.yamerins.DC; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import...
Try this. @EventHandler public void onBlockBreak(BlockBreakEvent event) { event.getBlock().getDrops().clear();...
It doesn't. An ItemStack is a slot of an inventory. An ItemStack can only be either a diamond block or a diacmond. In Minecraft, Diamond blocks...
The method I wrote should do that, except for the cancelling which is pretty straight-forward.
Separate names with a comma.