mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
Overhaul build proccess (#89)
- Now only requires CoreProtect in /lib - WorldEditListener and LibsDisguiseBridge updated - Releaseparrots will now check if there are any parrots - Fix some red lines in playerdata
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
//import me.libraryaddict.disguise.DisallowedDisguises;
|
||||
import me.libraryaddict.disguise.DisallowedDisguises;
|
||||
import me.totalfreedom.libsdisguise.DisallowedDisguises;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -23,8 +22,8 @@ public class Command_disguisetoggle extends FreedomCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
FUtil.adminAction(sender.getName(), (DisallowedDisguises.disabled ? "Enabling" : "Disabling") + " " +
|
||||
"disguises.", false);
|
||||
FUtil.adminAction(sender.getName(), (DisallowedDisguises.disabled ? "Enabling" : "Disabling")
|
||||
+ " disguises", false);
|
||||
|
||||
if (plugin.ldb.isDisguisesEnabled())
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Release parrots from your shoulders.", usage = "/<command>", aliases="removeparrots")
|
||||
@CommandParameters(description = "Release parrots from your shoulders.", usage = "/<command>", aliases = "removeparrots")
|
||||
public class Command_releaseparrots extends FreedomCommand
|
||||
{
|
||||
|
||||
@ -17,6 +17,13 @@ public class Command_releaseparrots extends FreedomCommand
|
||||
{
|
||||
Entity leftShoulderEntity = playerSender.getShoulderEntityLeft();
|
||||
Entity rightShoulderEntity = playerSender.getShoulderEntityRight();
|
||||
|
||||
if (rightShoulderEntity == null && leftShoulderEntity == null)
|
||||
{
|
||||
msg("No parrots were detected on either of your shoulders.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (leftShoulderEntity != null && leftShoulderEntity.getType().equals(EntityType.PARROT))
|
||||
{
|
||||
playerSender.setShoulderEntityLeft(null);
|
||||
@ -28,7 +35,6 @@ public class Command_releaseparrots extends FreedomCommand
|
||||
playerSender.setShoulderEntityRight(null);
|
||||
msg("Removed the parrot on your right shoulder.");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package me.totalfreedom.totalfreedommod.command;
|
||||
|
||||
//import me.libraryaddict.disguise.DisallowedDisguises;
|
||||
import me.libraryaddict.disguise.DisallowedDisguises;
|
||||
import me.totalfreedom.libsdisguise.DisallowedDisguises;
|
||||
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
import org.bukkit.command.Command;
|
||||
|
@ -27,11 +27,11 @@ public class Command_unlinkdiscord extends FreedomCommand
|
||||
Admin admin = plugin.al.getAdmin(playerSender);
|
||||
if (admin.getDiscordID() == null)
|
||||
{
|
||||
msg("Your minecraft account is not linked to a discord account.", ChatColor.RED);
|
||||
msg("Your Minecraft account is not linked to a discord account.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
admin.setDiscordID(null);
|
||||
msg("Your minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
|
||||
msg("Your Minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -39,12 +39,12 @@ public class Command_unlinkdiscord extends FreedomCommand
|
||||
VPlayer data = plugin.pv.getVerificationPlayer(playerSender);
|
||||
if (data.getDiscordId() == null)
|
||||
{
|
||||
msg("Your minecraft account is not linked to a discord account.", ChatColor.RED);
|
||||
msg("Your Minecraft account is not linked to a discord account.", ChatColor.RED);
|
||||
return true;
|
||||
}
|
||||
data.setDiscordId(null);
|
||||
data.setDiscordEnabled(false);
|
||||
msg("Your minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
|
||||
msg("Your Minecraft account has been successfully unlinked from the discord account.", ChatColor.GREEN);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user