Thats will not gonna work. The Bukkit API is copyrighted too...
XXLuigiMario Try casting it to ProjectileSource, at least in Netbeans, it works for me EDIT: Nevermind, AdamQpzm is right about Craftbukkit
You can't check if a sound is playing on a client, so you can't have events for this. When you use "playSound", the server sends a packet(some...
if(p.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { p.removePotionEffect(PotionEffectType.NIGHT_VISION); // DISABLED } else {...
If the yml file is wrote with UTF-8, I think it can work...
if(!ChatColor.stripColor(string).equals(string)) { // CONTAINS COLORS }
There are two getShooter() functions: public Entity getShooter(); // The deprecated one public ProjectileSource getShooter(); // The new one...
PandazNWafflez I cached, thanks for the suggestion. :) Also, maybe I'll create a PR (Pull Request) solving this bug. IDragonfire Removing the...
I'll give you some examples. My code: ItemFrame itemframe = (ItemFrame)cobblestoneBlock.getWorld().spawn(cobblestoneBlock,ItemFrame.class);...
Another awesome work from chasechocolate !
I was having many problems spawning and positioning an ItemFrame with the Bukkit API, so I created a method that let me spawn ItemFrames easily....
Hmm.. Thank you. EDIT: I found this https://github.com/forairan/ConvertUUID This will help me a lot :D
I have two questions about getUniqueId() : player.getUniqueId() will return the Mojang User Id or the entity id? entity.getUniqueId() will...
@EventHandler public void EntityDamageEvent(EntityDamageEvent event) { if(!(event.getEntity() instanceof Player)) return; // CHECK IF IS A PLAYER...
I never seen something explaining this before, so I wrote this thread. It's simple, like Console with ConsoleCommandSender: if(sender instanceof...
Comphenix Thank you a lot. +1[diamond] I love ProtocoLib, but I want to make my own Packet API.
You can use Sign sign = (Sign)block.getState();
@EventHandler public void viper(EntityDamageByEntityEvent e) { if(e.getDamager() instanceof Player) { if(e.getEntity() instanceof Player) { Player...
Don't use "return", it will stop reading your function. Remove the "else return;", your code will work normally.
Hello, I'm trying to send Packet20NamedEntitySpawn packet. My client crashes when receives the packet. My code: (p is a player, p2 is a string)...
Separate names with a comma.