- authme reloaded update
   * LowerCase PlayerNames
This commit is contained in:
Jascha Starke 2012-07-14 21:18:30 +02:00
parent 677664d529
commit 50f022e1fb
7 changed files with 21 additions and 14 deletions

View file

@ -12,7 +12,7 @@ Dependencies for optional integrations
* [WorldGuard](https://github.com/sk89q/worldguard)
* [WorldEdit](https://github.com/sk89q/worldedit)
* [xAuth](http://dev.bukkit.org/server-mods/xauth/)
* [AuthMe](http://dev.bukkit.org/server-mods/authme-reloaded/)
* [AuthMe](http://dev.bukkit.org/server-mods/authme-reloaded/) ([GitSource](https://github.com/Multiplayer-italia/AuthMe-Reloaded))
* [Multiverse-Core](http://dev.bukkit.org/server-mods/multiverse-core/)
----
@ -22,4 +22,4 @@ To use Maven packaging
For required development snapshots, that aren't found by maven, you have to clone the project and do:
$ mvn install
in the directory of the project
in the directory of the project

View file

@ -1,6 +1,6 @@
name: LimitedCreative
main: de.jaschastarke.minecraft.limitedcreative.Core
version: 1.2.3-beta
version: 1.2.5
softdepend: [WorldGuard, WorldEdit, MultiInv]
dev-url: http://dev.bukkit.org/server-mods/limited-creative/
commands:

10
pom.xml
View file

@ -3,7 +3,7 @@
<groupId>de.jaschastarke</groupId>
<artifactId>LimitedCreative</artifactId>
<name>LimitedCreative</name>
<version>1.2.3</version>
<version>1.2.5</version>
<url>https://github.com/possi/LimitedCreative</url>
<scm>
<connection>scm:git:git://github.com/possi/LimitedCreative.git</connection>
@ -58,8 +58,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
@ -68,12 +68,12 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.2.5-R1.0</version>
<version>1.2.5-R4.0</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>5.5.2</version>
<version>5.5.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>uk.org.whoami</groupId>

View file

@ -25,12 +25,12 @@ import de.jaschastarke.minecraft.limitedcreative.Core;
public class AuthMe implements CommunicationBridge {
public static boolean isLoggedIn(Player player) {
boolean li = PlayerCache.getInstance().isAuthenticated(player.getName());
boolean li = PlayerCache.getInstance().isAuthenticated(player.getName().toLowerCase());
Core.debug("AuthMe: "+player.getName()+": logged in: "+li);
return li;
}
public static boolean isLoggedInComplete(Player player) {
boolean li = isLoggedIn(player) && LimboCache.getInstance().getLimboPlayer(player.getName()) == null;
boolean li = isLoggedIn(player) && LimboCache.getInstance().getLimboPlayer(player.getName().toLowerCase()) == null;
Core.debug("AuthMe: "+player.getName()+": logged in complete: "+li);
return li;
}

View file

@ -54,6 +54,7 @@ public class Configuration {
REMOVEPICKUP("limit.remove_pickup", false),
PERMISSIONS("permissions.enabled", false),
PERM_KEEPINVENTORY("permissions.keepinventory", false),
PERM_WEPIF("permissions.wepif", true),
DEBUG("debug", false);
private String key;
@ -154,6 +155,9 @@ public class Configuration {
public boolean getPermissionToKeepInventory() {
return this.getPermissionsEnabled() && this.getBoolean(Option.PERM_KEEPINVENTORY);
}
public boolean getWEPIFEnabled() {
return this.getBoolean(Option.PERM_WEPIF);
}
public boolean getRegionOptional() {
return this.getBoolean(Option.REGION_OPTIONAL);
}

View file

@ -418,11 +418,12 @@ public class LCPlayer {
getPlayer().setGameMode(region_gamemode);
}
}
} else if (region_gamemode == null && getPlayer().getGameMode() != DEFAULT_GAMEMODE && !isInPermanentGameMode(CURRENT_GAMEMODE)) {
} else if (region_gamemode == null && getPlayer().getGameMode() != DEFAULT_GAMEMODE && !isInPermanentGameMode(CURRENT_GAMEMODE) && getActiveRegionGameMode() != null) {
Core.debug(getName()+": leaving creative area");
// 1. the region doesn't allow "the other gamemode"
// 2. but the player is in that mode
// 3. and the player isn't global (permanent) in that mode
// 4. and the player isn't temporary in that mode (that means its maybe a world teleport, and the mode changes afterwards)
// result: change him back to default mode
if (checkSwitchFlight(area_event)) {
storeActiveRegionGameMode(null);

View file

@ -31,9 +31,11 @@ public class Permissions {
public Permissions(JavaPlugin plugin) {
this.plugin = plugin;
try {
// because worldedit may be not loaded as plugin, just as library, we check that way
Class.forName("com.sk89q.wepif.PermissionsResolverManager", false, plugin.getClass().getClassLoader());
pif = new PermissionsBridge(plugin);
if (Core.plugin.config.getWEPIFEnabled()) {
// because worldedit may be not loaded as plugin, just as library, we check that way
Class.forName("com.sk89q.wepif.PermissionsResolverManager", false, plugin.getClass().getClassLoader());
pif = new PermissionsBridge(plugin);
}
} catch (ClassNotFoundException e) {}
}