Fixed capitalisation

This commit is contained in:
Alastair 2017-07-20 15:28:00 +01:00
parent de987f0555
commit 43160e35d9
4 changed files with 13 additions and 14 deletions

View File

@ -440,19 +440,19 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
if (args.length > 1) { if (args.length > 1) {
String posX = portalConfig.getConfig().getString(args[1] + ".pos1.X"); String posX = portalConfig.getConfig().getString(args[1] + ".pos1.X");
if (posX != null) { if (posX != null) {
Selection.Show(player, this.plugin, args[1]); Selection.show(player, this.plugin, args[1]);
} else { } else {
sender.sendMessage(PluginMessages.customPrefixFail + " No portal by that name exists!"); sender.sendMessage(PluginMessages.customPrefixFail + " No portal by that name exists!");
} }
} else { } else {
if (player.hasMetadata("selectedPortal")) { if (player.hasMetadata("selectedPortal")) {
player.sendMessage(PluginMessages.customPrefix + " Your currently selected portal has been shown, it will dissapear shortly!"); player.sendMessage(PluginMessages.customPrefix + " Your currently selected portal has been shown, it will dissapear shortly!");
Selection.Show(player, this.plugin, player.getMetadata("selectedPortal").get(0).asString()); Selection.show(player, this.plugin, player.getMetadata("selectedPortal").get(0).asString());
} else if (player.hasMetadata("Pos1World") && player.hasMetadata("Pos2World")) { } else if (player.hasMetadata("Pos1World") && player.hasMetadata("Pos2World")) {
if (player.getMetadata("Pos1World").get(0).asString().equals(player.getMetadata("Pos2World").get(0).asString()) if (player.getMetadata("Pos1World").get(0).asString().equals(player.getMetadata("Pos2World").get(0).asString())
&& player.getMetadata("Pos1World").get(0).asString().equals(player.getLocation().getWorld().getName())) { && player.getMetadata("Pos1World").get(0).asString().equals(player.getLocation().getWorld().getName())) {
player.sendMessage(PluginMessages.customPrefix + " Your currently selected area has been shown, it will dissapear shortly!"); player.sendMessage(PluginMessages.customPrefix + " Your currently selected area has been shown, it will dissapear shortly!");
Selection.Show(player, this.plugin, null); Selection.show(player, this.plugin, null);
} }
} else { } else {
player.sendMessage(PluginMessages.customPrefixFail + " No regions selected!"); player.sendMessage(PluginMessages.customPrefixFail + " No regions selected!");
@ -631,7 +631,7 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
@Override @Override
public List<String> onTabComplete(CommandSender sender, Command cmd, String command, String[] args) { public List<String> onTabComplete(CommandSender sender, Command cmd, String command, String[] args) {
LinkedList<String> autoComplete = new LinkedList<String>(); LinkedList<String> autoComplete = new LinkedList<String>();
if (sender.hasPermission("AdvancedPortals.CreatePortal")) { if (sender.hasPermission("advancedportals.createportal")) {
if (args.length == 1 || (args.length == 2 && args[0].toLowerCase().equals("help"))) { if (args.length == 1 || (args.length == 2 && args[0].toLowerCase().equals("help"))) {
autoComplete.addAll(Arrays.asList("create", "list", "portalblock", "select", "unselect", "command", "selector" autoComplete.addAll(Arrays.asList("create", "list", "portalblock", "select", "unselect", "command", "selector"
, "show", "gatewayblock", "endportalblock", "variables", "wand", "remove", "rename", "help", "bukkitpage", "helppage")); , "show", "gatewayblock", "endportalblock", "variables", "wand", "remove", "rename", "help", "bukkitpage", "helppage"));

View File

@ -7,7 +7,6 @@ import com.sekwah.advancedportals.effects.WarpEffects;
import com.sekwah.advancedportals.listeners.*; import com.sekwah.advancedportals.listeners.*;
import com.sekwah.advancedportals.metrics.Metrics; import com.sekwah.advancedportals.metrics.Metrics;
import com.sekwah.advancedportals.portals.Portal; import com.sekwah.advancedportals.portals.Portal;
import org.bukkit.Material;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import java.io.*; import java.io.*;
@ -142,7 +141,7 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
} }
private void setupDataCollector() { private void setupDataCollector() {
Selection.LoadData(this); Selection.loadData(this);
} }
private void setupBungee() { private void setupBungee() {

View File

@ -7,12 +7,12 @@ import org.bukkit.entity.Player;
public class Selection { public class Selection {
public static Material blockType = Material.STAINED_GLASS; private static Material blockType = Material.STAINED_GLASS;
public static int timeout = 10; private static int timeout = 10;
public static byte metadata = 14; private static byte metadata = 14;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static void LoadData(AdvancedPortalsPlugin plugin) { public static void loadData(AdvancedPortalsPlugin plugin) {
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml"); ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
timeout = config.getConfig().getInt("ShowSelectionShowDuration"); timeout = config.getConfig().getInt("ShowSelectionShowDuration");
@ -32,7 +32,7 @@ public class Selection {
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static void Show(final Player player, final AdvancedPortalsPlugin plugin, String portalName) { public static void show(final Player player, final AdvancedPortalsPlugin plugin, String portalName) {
int LowX = 0; int LowX = 0;
int LowY = 0; int LowY = 0;
@ -136,14 +136,14 @@ public class Selection {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
public void run() { public void run() {
Selection.Hide(player, plugin, pos1, pos2); Selection.hide(player, plugin, pos1, pos2);
} }
}, timeout * 20); }, timeout * 20);
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
protected static void Hide(Player player, AdvancedPortalsPlugin plugin, Location pos1, Location pos2) { protected static void hide(Player player, AdvancedPortalsPlugin plugin, Location pos1, Location pos2) {
int LowX = pos1.getBlockX(); int LowX = pos1.getBlockX();
int LowY = pos1.getBlockY(); int LowY = pos1.getBlockY();

View File

@ -118,7 +118,7 @@ public class DestinationCommand implements CommandExecutor, TabCompleter {
autoComplete.add(string); autoComplete.add(string);
} }
} }
if (sender.hasPermission("advancedportals.desti") | sender.hasPermission("AdvancedPortals.CreatePortal")) { if (sender.hasPermission("advancedportals.desti") | sender.hasPermission("advancedportals.createportal")) {
if (args.length == 1) { if (args.length == 1) {
autoComplete.addAll(Arrays.asList("create", "remove", "help")); autoComplete.addAll(Arrays.asList("create", "remove", "help"));
} else if (args[0].toLowerCase().equals("create")) { } else if (args[0].toLowerCase().equals("create")) {