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
main: de.jaschastarke.minecraft.limitedcreative.Core
version: 1.2.0-alpha
version: 1.2.1-alpha
softdepend: [WorldGuard, WorldEdit, MultiInv]
dev-url: http://dev.bukkit.org/server-mods/limited-creative/
commands:

30
pom.xml
View file

@ -26,9 +26,31 @@
<id>sk89q-mvn2</id>
<url>http://mvn2.sk89q.com/repo</url>
</repository>
<!-- Official Multiverse repository -->
<repository>
<id>onarandombox</id>
<url>http://repo.onarandombox.com/content/groups/public</url>
</repository>
</repositories>
<build>
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -45,7 +67,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.2.3-R0.1-SNAPSHOT</version>
<version>1.2.3-R0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
@ -58,9 +80,9 @@
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>com.onarandombox</groupId>
<artifactId>multiverse-core</artifactId>
<version>2.3-AB</version>
<groupId>com.onarandombox.multiversecore</groupId>
<artifactId>Multiverse-Core</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.cypherx</groupId>

View file

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

View file

@ -22,19 +22,16 @@ import org.bukkit.GameMode;
import org.bukkit.World;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
import de.jaschastarke.minecraft.limitedcreative.Core;
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) {
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);
return gm;
}