StringBuilder, rename local, javadocs
This commit is contained in:
parent
c4b48df0ee
commit
d32a077359
@ -290,7 +290,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
private String toReadable(String string) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (String s : string.split("_")) {
|
||||
builder.append(s.substring(0, 1) + s.substring(1).toLowerCase());
|
||||
builder.append(s.substring(0, 1)).append(s.substring(1).toLowerCase());
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
@ -305,11 +305,11 @@ public class FlagWatcher {
|
||||
if (itemStack == null) {
|
||||
// Find the item to replace it with
|
||||
if (getDisguise().getEntity() instanceof LivingEntity) {
|
||||
EntityEquipment enquipment = ((LivingEntity) getDisguise().getEntity()).getEquipment();
|
||||
EntityEquipment equipment = ((LivingEntity) getDisguise().getEntity()).getEquipment();
|
||||
if (slot == 4) {
|
||||
itemStack = enquipment.getItemInHand();
|
||||
itemStack = equipment.getItemInHand();
|
||||
} else {
|
||||
itemStack = enquipment.getArmorContents()[slot];
|
||||
itemStack = equipment.getArmorContents()[slot];
|
||||
}
|
||||
if (itemStack != null && itemStack.getTypeId() == 0) {
|
||||
itemStack = null;
|
||||
|
@ -350,7 +350,6 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
||||
// Parse to horse color
|
||||
} else if (param.getSimpleName().equals("Color")) {
|
||||
try {
|
||||
|
||||
value = param.getMethod("valueOf", String.class).invoke(null, valueString.toUpperCase());
|
||||
} catch (Exception ex) {
|
||||
throw parseToException("a horse color", valueString, methodName);
|
||||
|
@ -30,7 +30,6 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
@ -175,8 +174,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Sends
|
||||
* entity removal packets, as this disguise was removed
|
||||
* Sends entity removal packets, as this disguise was removed
|
||||
*/
|
||||
public static void destroyEntity(TargetedDisguise disguise) {
|
||||
try {
|
||||
@ -461,8 +459,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Resends
|
||||
* the entity to this specific player
|
||||
* Resends the entity to this specific player
|
||||
*/
|
||||
public static void refreshTracker(TargetedDisguise disguise, String player) {
|
||||
if (disguise.getEntity() != null && disguise.getEntity().isValid()) {
|
||||
@ -495,8 +492,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param A
|
||||
* convidence method for me to refresh trackers in other plugins
|
||||
* A convenience method for me to refresh trackers in other plugins
|
||||
*/
|
||||
public static void refreshTrackers(Entity entity) {
|
||||
if (entity.isValid()) {
|
||||
@ -532,8 +528,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Resends
|
||||
* the entity to all the watching players, which is where the magic begins
|
||||
* Resends the entity to all the watching players, which is where the magic begins
|
||||
*/
|
||||
public static void refreshTrackers(TargetedDisguise disguise) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user