10-09-2015, 12:26 AM
(This post was last modified: 10-09-2015, 12:32 AM by JonnyBoy0719.)
(10-09-2015, 12:22 AM)NiLSPACE Wrote: Wow, I'm impressed. The only thing that you might want to change is showing a "Remove Permission" instead of no button at all.
But seriously, I'm amazed that this is your first Cuberite plugin.
When I saw that you used LUA for plugins, I dived straight in since I already know some LUA And yeah, I could do that, can do a small update to include it.
Also, One thing you might have noticed on the video is that I added a command for Core called /killall, basically the same idea from Bukkit Essentials, execpt it kills all hostile mobs in the world (or do /killall all to kill non hostile ones (wolfs, cats, squids, villagers etc))
Here is the code tho
function HandleKillMobsCommand( Split, Player ) local GetMobs = 0 local CountIfMob = function(Entity) if Entity:IsMob() and not Entity:IsDestroyed() then GetMobs = GetMobs + 1 local class = Entity:GetClass() -- Got lazy here if Split[2] == "" or Split[2] ~= "all" then if class == "cSkeleton" or class == "cEnderman" or class == "cZombie" or class == "cSpider" or class == "cGuardian" or class == "cSlime" then Entity:Destroy() end else Entity:Destroy() end end end Player:GetWorld():ForEachEntity(CountIfMob) Player:SendMessage("All " .. GetMobs .. " mobs has been deleted") return true end
a quick little bump, the remove permission has now been added, and its on github