v1.2.1-alpha:

- muliverse unhandled worlds fix
 - publsh of armor config fix
This commit is contained in:
Jascha Starke 2012-03-16 16:37:43 +01:00
parent c354c19974
commit 72715a40c4
4 changed files with 42 additions and 17 deletions

View file

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

30
pom.xml
View file

@ -26,9 +26,31 @@
<id>sk89q-mvn2</id> <id>sk89q-mvn2</id>
<url>http://mvn2.sk89q.com/repo</url> <url>http://mvn2.sk89q.com/repo</url>
</repository> </repository>
<!-- Official Multiverse repository -->
<repository>
<id>onarandombox</id>
<url>http://repo.onarandombox.com/content/groups/public</url>
</repository>
</repositories> </repositories>
<build> <build>
<sourceDirectory>${basedir}/src</sourceDirectory> <sourceDirectory>${basedir}/src</sourceDirectory>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/</directory>
<includes>
<include>plugin.yml</include>
<include>config.yml</include>
</includes>
</resource>
<resource>
<targetPath>lang/</targetPath>
<directory>${basedir}/lang/</directory>
</resource>
</resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -45,7 +67,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.2.3-R0.1-SNAPSHOT</version> <version>1.2.3-R0.2-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.sk89q</groupId> <groupId>com.sk89q</groupId>
@ -58,9 +80,9 @@
<version>2.6.2</version> <version>2.6.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.onarandombox</groupId> <groupId>com.onarandombox.multiversecore</groupId>
<artifactId>multiverse-core</artifactId> <artifactId>Multiverse-Core</artifactId>
<version>2.3-AB</version> <version>2.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.cypherx</groupId> <groupId>com.cypherx</groupId>

View file

@ -40,15 +40,21 @@ public class Communicator extends AbstractCommunicator {
public boolean isCreative(World world) { public boolean isCreative(World world) {
boolean creative = Bukkit.getServer().getDefaultGameMode() == GameMode.CREATIVE; boolean creative = Bukkit.getServer().getDefaultGameMode() == GameMode.CREATIVE;
if (isPluginEnabled("Multiverse-Core")) if (isMultiVerse()) {
creative = MultiVerse.isCreative(world); GameMode tmp = MultiVerse.getGameMode(world);
if (tmp != null)
creative = tmp == GameMode.CREATIVE;
}
Core.debug("com: "+world.getName()+": is creative: "+creative); Core.debug("com: "+world.getName()+": is creative: "+creative);
return creative; return creative;
} }
public GameMode getDefaultGameMode(World world) { public GameMode getDefaultGameMode(World world) {
GameMode def = Bukkit.getServer().getDefaultGameMode(); GameMode def = Bukkit.getServer().getDefaultGameMode();
if (isMultiVerse()) if (isMultiVerse()) {
def = MultiVerse.getGameMode(world); GameMode tmp = MultiVerse.getGameMode(world);
if (tmp != null)
def = tmp;
}
Core.debug("com: "+world.getName()+": game mode: "+def); Core.debug("com: "+world.getName()+": game mode: "+def);
return def; return def;
} }

View file

@ -22,19 +22,16 @@ import org.bukkit.GameMode;
import org.bukkit.World; import org.bukkit.World;
import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
import de.jaschastarke.minecraft.limitedcreative.Core; import de.jaschastarke.minecraft.limitedcreative.Core;
public class MultiVerse implements CommunicationBridge { public class MultiVerse implements CommunicationBridge {
public static boolean isCreative(World world) {
boolean ic = getMV().getMVWorldManager().getMVWorld(world).getGameMode() == GameMode.CREATIVE;
Core.debug("Multiverse: "+world.getName()+": is creative: "+ic);
return ic;
}
public static GameMode getGameMode(World world) { public static GameMode getGameMode(World world) {
GameMode gm = getMV().getMVWorldManager().getMVWorld(world).getGameMode(); MultiverseWorld mvWorld = getMV().getMVWorldManager().getMVWorld(world);
if (mvWorld == null)
return null;
GameMode gm = mvWorld.getGameMode();
Core.debug("Multiverse: "+world.getName()+": game mode: "+gm); Core.debug("Multiverse: "+world.getName()+": game mode: "+gm);
return gm; return gm;
} }