Wtf was that? D:

This commit is contained in:
Gabriele C 2016-05-20 15:53:39 +02:00
parent 8dd5420e1a
commit 2edcb703c1

View File

@ -1,6 +1,9 @@
package fr.xephi.authme.listener; package fr.xephi.authme.listener;
import fr.xephi.authme.settings.NewSetting;
import fr.xephi.authme.settings.SpawnLoader; import fr.xephi.authme.settings.SpawnLoader;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -16,11 +19,20 @@ public class AuthMePlayerListener19 implements Listener {
@Inject @Inject
private SpawnLoader spawnLoader; private SpawnLoader spawnLoader;
AuthMePlayerListener19() { } @Inject
private NewSetting settings;
/* WTF was that? We need to check all the settings before moving the player to the spawn!
*
* TODO: fixme please!
*
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerSpawn(PlayerSpawnLocationEvent event) { public void onPlayerSpawn(PlayerSpawnLocationEvent event) {
if(settings.getProperty(RestrictionSettings.NO_TELEPORT)) {
return;
}
event.setSpawnLocation(spawnLoader.getSpawnLocation(event.getPlayer())); event.setSpawnLocation(spawnLoader.getSpawnLocation(event.getPlayer()));
} }
*/
} }