mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 20:15:58 +01:00
Fixed capitalisation
This commit is contained in:
parent
de987f0555
commit
43160e35d9
@ -440,19 +440,19 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
if (args.length > 1) {
|
||||
String posX = portalConfig.getConfig().getString(args[1] + ".pos1.X");
|
||||
if (posX != null) {
|
||||
Selection.Show(player, this.plugin, args[1]);
|
||||
Selection.show(player, this.plugin, args[1]);
|
||||
} else {
|
||||
sender.sendMessage(PluginMessages.customPrefixFail + " No portal by that name exists!");
|
||||
}
|
||||
} else {
|
||||
if (player.hasMetadata("selectedPortal")) {
|
||||
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")) {
|
||||
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.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 {
|
||||
player.sendMessage(PluginMessages.customPrefixFail + " No regions selected!");
|
||||
@ -631,7 +631,7 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String command, String[] args) {
|
||||
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"))) {
|
||||
autoComplete.addAll(Arrays.asList("create", "list", "portalblock", "select", "unselect", "command", "selector"
|
||||
, "show", "gatewayblock", "endportalblock", "variables", "wand", "remove", "rename", "help", "bukkitpage", "helppage"));
|
||||
|
@ -7,7 +7,6 @@ import com.sekwah.advancedportals.effects.WarpEffects;
|
||||
import com.sekwah.advancedportals.listeners.*;
|
||||
import com.sekwah.advancedportals.metrics.Metrics;
|
||||
import com.sekwah.advancedportals.portals.Portal;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.*;
|
||||
@ -142,7 +141,7 @@ public class AdvancedPortalsPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
private void setupDataCollector() {
|
||||
Selection.LoadData(this);
|
||||
Selection.loadData(this);
|
||||
}
|
||||
|
||||
private void setupBungee() {
|
||||
|
@ -7,12 +7,12 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class Selection {
|
||||
|
||||
public static Material blockType = Material.STAINED_GLASS;
|
||||
public static int timeout = 10;
|
||||
public static byte metadata = 14;
|
||||
private static Material blockType = Material.STAINED_GLASS;
|
||||
private static int timeout = 10;
|
||||
private static byte metadata = 14;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void LoadData(AdvancedPortalsPlugin plugin) {
|
||||
public static void loadData(AdvancedPortalsPlugin plugin) {
|
||||
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
||||
|
||||
timeout = config.getConfig().getInt("ShowSelectionShowDuration");
|
||||
@ -32,7 +32,7 @@ public class Selection {
|
||||
}
|
||||
|
||||
@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 LowY = 0;
|
||||
@ -136,14 +136,14 @@ public class Selection {
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
Selection.Hide(player, plugin, pos1, pos2);
|
||||
Selection.hide(player, plugin, pos1, pos2);
|
||||
}
|
||||
}, timeout * 20);
|
||||
|
||||
}
|
||||
|
||||
@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 LowY = pos1.getBlockY();
|
||||
|
@ -118,7 +118,7 @@ public class DestinationCommand implements CommandExecutor, TabCompleter {
|
||||
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) {
|
||||
autoComplete.addAll(Arrays.asList("create", "remove", "help"));
|
||||
} else if (args[0].toLowerCase().equals("create")) {
|
||||
|
Loading…
Reference in New Issue
Block a user