mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-29 14:05:11 +01:00
Changed the § symbol to \u00A7 to stop problems when cloning the repo
This commit is contained in:
parent
86d13268b5
commit
10319d8b3e
@ -1,6 +1,6 @@
|
|||||||
package com.sekwah.advancedportals;
|
package com.sekwah.advancedportals;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.portalcontrolls.Portal;
|
import com.sekwah.advancedportals.portals.Portal;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
@ -4,7 +4,7 @@ import com.sekwah.advancedportals.DataCollector.DataCollector;
|
|||||||
import com.sekwah.advancedportals.compat.NMS;
|
import com.sekwah.advancedportals.compat.NMS;
|
||||||
import com.sekwah.advancedportals.destinations.Destination;
|
import com.sekwah.advancedportals.destinations.Destination;
|
||||||
import com.sekwah.advancedportals.metrics.Metrics;
|
import com.sekwah.advancedportals.metrics.Metrics;
|
||||||
import com.sekwah.advancedportals.portalcontrolls.Portal;
|
import com.sekwah.advancedportals.portals.Portal;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -18,8 +18,6 @@ public class ConfigAccessor {
|
|||||||
private FileConfiguration fileConfiguration;
|
private FileConfiguration fileConfiguration;
|
||||||
|
|
||||||
public ConfigAccessor(JavaPlugin plugin, String fileName) {
|
public ConfigAccessor(JavaPlugin plugin, String fileName) {
|
||||||
if (!plugin.isInitialized())
|
|
||||||
throw new IllegalArgumentException("plugin must be initiaized");
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.sekwah.advancedportals;
|
package com.sekwah.advancedportals;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.portalcontrolls.AdvancedPortal;
|
import com.sekwah.advancedportals.portals.AdvancedPortal;
|
||||||
import com.sekwah.advancedportals.portalcontrolls.Portal;
|
import com.sekwah.advancedportals.portals.Portal;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.sekwah.advancedportals;
|
package com.sekwah.advancedportals;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.events.WarpEvent;
|
import com.sekwah.advancedportals.events.WarpEvent;
|
||||||
import com.sekwah.advancedportals.portalcontrolls.AdvancedPortal;
|
import com.sekwah.advancedportals.portals.AdvancedPortal;
|
||||||
import com.sekwah.advancedportals.portalcontrolls.Portal;
|
import com.sekwah.advancedportals.portals.Portal;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -194,8 +194,6 @@ public class Listeners implements Listener {
|
|||||||
|
|
||||||
if((Portal.Portals[portalId].pos2.getX() - 3D) <= block.getX() && (Portal.Portals[portalId].pos2.getY() - 3D) <= block.getY() && (Portal.Portals[portalId].pos2.getZ() - 3D) <= block.getZ()){
|
if((Portal.Portals[portalId].pos2.getX() - 3D) <= block.getX() && (Portal.Portals[portalId].pos2.getY() - 3D) <= block.getY() && (Portal.Portals[portalId].pos2.getZ() - 3D) <= block.getZ()){
|
||||||
player.sendMessage("\u00A7a[\u00A7eAdvancedPortals\u00A7a] You have selected: \u00A7e" + Portal.Portals[portalId].portalName);
|
player.sendMessage("\u00A7a[\u00A7eAdvancedPortals\u00A7a] You have selected: \u00A7e" + Portal.Portals[portalId].portalName);
|
||||||
// TODO add code somewhere so when a portal is removed or changed if someone has it selected it notifies them
|
|
||||||
// or removed their selections and tells them, maybe not before this update.
|
|
||||||
player.removeMetadata("selectingPortal", plugin);
|
player.removeMetadata("selectingPortal", plugin);
|
||||||
player.setMetadata("selectedPortal", new FixedMetadataValue(plugin, Portal.Portals[portalId].portalName)); // adds the name to the metadata of the character
|
player.setMetadata("selectedPortal", new FixedMetadataValue(plugin, Portal.Portals[portalId].portalName)); // adds the name to the metadata of the character
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.sekwah.advancedportals;
|
package com.sekwah.advancedportals;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.portalcontrolls.Portal;
|
import com.sekwah.advancedportals.portals.Portal;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.sekwah.advancedportals.portalcontrolls;
|
package com.sekwah.advancedportals.portals;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
@ -1,4 +1,4 @@
|
|||||||
package com.sekwah.advancedportals.portalcontrolls;
|
package com.sekwah.advancedportals.portals;
|
||||||
|
|
||||||
import com.google.common.io.ByteArrayDataOutput;
|
import com.google.common.io.ByteArrayDataOutput;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
@ -274,6 +274,8 @@ public class Portal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.getConfig().set(name, null);
|
config.getConfig().set(name, null);
|
||||||
|
|
||||||
|
// TODO add code to check if people have the portal selected and notify if removed.
|
||||||
|
|
||||||
/**Set<String> keys = config.getConfig().getKeys(true);
|
/**Set<String> keys = config.getConfig().getKeys(true);
|
||||||
for(String key: keys){
|
for(String key: keys){
|
Loading…
Reference in New Issue
Block a user