v1.4.0b:
- Fix: CmdBlocker not active in survival mode
This commit is contained in:
parent
251de6aa5c
commit
f0e6e853a6
3 changed files with 16 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
||||||
name: LimitedCreative
|
name: LimitedCreative
|
||||||
main: de.jaschastarke.minecraft.limitedcreative.Core
|
main: de.jaschastarke.minecraft.limitedcreative.Core
|
||||||
version: 1.4.0a
|
version: 1.4.0b
|
||||||
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:
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<groupId>de.jaschastarke</groupId>
|
<groupId>de.jaschastarke</groupId>
|
||||||
<artifactId>LimitedCreative</artifactId>
|
<artifactId>LimitedCreative</artifactId>
|
||||||
<name>LimitedCreative</name>
|
<name>LimitedCreative</name>
|
||||||
<version>1.4.0a</version>
|
<version>1.4.0b</version>
|
||||||
<url>https://github.com/possi/LimitedCreative</url>
|
<url>https://github.com/possi/LimitedCreative</url>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git://github.com/possi/LimitedCreative.git</connection>
|
<connection>scm:git:git://github.com/possi/LimitedCreative.git</connection>
|
||||||
|
|
|
@ -2,6 +2,7 @@ package de.jaschastarke.minecraft.limitedcreative.cmdblock;
|
||||||
|
|
||||||
import static de.jaschastarke.minecraft.utils.Locale.L;
|
import static de.jaschastarke.minecraft.utils.Locale.L;
|
||||||
|
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ public class CommandBlocker {
|
||||||
class Listener implements org.bukkit.event.Listener {
|
class Listener implements org.bukkit.event.Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPreCommand(PlayerCommandPreprocessEvent event) {
|
public void onPreCommand(PlayerCommandPreprocessEvent event) {
|
||||||
|
if (event.getPlayer().getGameMode() == GameMode.CREATIVE) {
|
||||||
String cmd = event.getMessage();
|
String cmd = event.getMessage();
|
||||||
if (cmd.startsWith("/")) { // just to be sure ;)
|
if (cmd.startsWith("/")) { // just to be sure ;)
|
||||||
cmd = cmd.substring(1);
|
cmd = cmd.substring(1);
|
||||||
|
@ -40,3 +42,4 @@ public class CommandBlocker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue