diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/persistence/PersistenceModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/persistence/PersistenceModule.java index 657cf4431..9337a7284 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/persistence/PersistenceModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/persistence/PersistenceModule.java @@ -4,12 +4,15 @@ import mineplex.core.MiniPlugin; import mineplex.core.ReflectivelyCreateMiniPlugin; import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClientManager; +import mineplex.core.common.util.F; +import mineplex.core.portal.events.ServerTransferEvent; import mineplex.gemhunters.death.event.QuitNPCDespawnEvent; import mineplex.gemhunters.economy.CashOutModule; import mineplex.gemhunters.economy.EconomyModule; import mineplex.gemhunters.loot.InventoryModule; import mineplex.gemhunters.quest.QuestModule; import mineplex.gemhunters.quest.QuestPlayerData; +import mineplex.serverdata.commands.ServerTransfer; import net.minecraft.server.v1_8_R3.EntityItemFrame; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -132,6 +135,16 @@ public class PersistenceModule extends MiniPlugin } } + @EventHandler + public void serverTransfer(ServerTransferEvent event) + { + if (event.getServer().startsWith("GH-")) + { + event.getPlayer().sendMessage(F.main("Portal", "Sorry, in order to switch servers please use /hub.")); + event.setCancelled(true); + } + } + public final PersistenceRepository getRepository() { return _repository;