Changes configuration values to lower camelcase
Also fixes some grammar mistakes related to the word reforge
This commit is contained in:
@ -57,13 +57,13 @@ public class ReforgeSession implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the actual re-forge which fixes the item and gives it back to the player
|
||||
* Runs the actual reforge which fixes the item and gives it back to the player
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
sendNPCMessage(this.npc, player, reforgeItem() ? config.getSuccessMessage() : config.getFailMessage());
|
||||
|
||||
//Stop the re-forged item from displaying in the blacksmith's hand
|
||||
//Stop the reforged item from displaying in the blacksmith's hand
|
||||
if (npc.getEntity() instanceof Player) {
|
||||
((Player) npc.getEntity()).getInventory().setItemInMainHand(null);
|
||||
} else {
|
||||
@ -93,9 +93,9 @@ public class ReforgeSession implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the actual re-forge where the item's damage is reduced
|
||||
* Performs the actual reforge where the item's damage is reduced
|
||||
*
|
||||
* @return <p>Whether the re-forge was successful. False if the blacksmith failed to fully repair the item.</p>
|
||||
* @return <p>Whether the reforge was successful. False if the blacksmith failed to fully repair the item.</p>
|
||||
*/
|
||||
private boolean reforgeItem() {
|
||||
if (random.nextInt(100) < config.getFailChance()) {
|
||||
@ -108,7 +108,7 @@ public class ReforgeSession implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* The method to run when a blacksmith successfully re-forges an item
|
||||
* The method to run when a blacksmith successfully reforges an item
|
||||
*/
|
||||
private void succeedReforge() {
|
||||
// Remove any damage done to the item
|
||||
@ -223,10 +223,10 @@ public class ReforgeSession implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the given player is currently in a re-forge session
|
||||
* Gets whether the given player is currently in a reforging session
|
||||
*
|
||||
* @param other <p>The player to check if is in session</p>
|
||||
* @return <p>True if the given player is in a re-forge session</p>
|
||||
* @return <p>True if the given player is in a reforge session</p>
|
||||
*/
|
||||
public boolean isInSession(Player other) {
|
||||
return player.getName().equals(other.getName());
|
||||
@ -237,12 +237,12 @@ public class ReforgeSession implements Runnable {
|
||||
*/
|
||||
public void beginReforge() {
|
||||
if (!config.getDisableCoolDown()) {
|
||||
//Finish the re-forge after a random delay between the max and min
|
||||
//Finish the reforging after a random delay between the max and min
|
||||
taskId = BlacksmithPlugin.getInstance().getServer().getScheduler().scheduleSyncDelayedTask(
|
||||
BlacksmithPlugin.getInstance(), this, (new Random().nextInt(config.getMaxReforgeDelay()) +
|
||||
config.getMinReforgeDelay()) * 20L);
|
||||
} else {
|
||||
//Finish the re-forge as soon as possible
|
||||
//Finish the reforging as soon as possible
|
||||
taskId = BlacksmithPlugin.getInstance().getServer().getScheduler().scheduleSyncDelayedTask(
|
||||
BlacksmithPlugin.getInstance(), this, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user