Skip to content

Commit f301aab

Browse files
committed
Merge branch 'master' of github.com:sk89q/commandhelper
2 parents e2220aa + 60e89ad commit f301aab

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@
5252
import com.laytonsmith.abstraction.enums.MCPatternShape;
5353
import com.laytonsmith.abstraction.enums.MCRecipeType;
5454
import com.laytonsmith.abstraction.enums.MCTone;
55+
import com.laytonsmith.abstraction.enums.MCVersion;
5556
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCDyeColor;
5657
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCEntityType;
5758
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCPatternShape;
5859
import com.laytonsmith.annotations.convert;
5960
import com.laytonsmith.commandhelper.CommandHelperPlugin;
6061
import com.laytonsmith.core.CHLog;
6162
import com.laytonsmith.core.LogLevel;
63+
import com.laytonsmith.core.Static;
6264
import com.laytonsmith.core.constructs.Target;
6365
import com.laytonsmith.core.environments.CommandHelperEnvironment;
6466
import com.laytonsmith.core.environments.Environment;
@@ -419,7 +421,7 @@ public List<MCEntity> GetEntitiesAt(MCLocation location, double radius) {
419421
}
420422

421423
public static MCItemMeta BukkitGetCorrectMeta(ItemMeta im) {
422-
if (im instanceof BannerMeta) {
424+
if (Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_8) && im instanceof BannerMeta) {
423425
return new BukkitMCBannerMeta((BannerMeta) im);
424426
}
425427
if (im instanceof BookMeta) {

src/main/java/com/laytonsmith/core/events/drivers/EntityEvents.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.laytonsmith.abstraction.MCWorld;
1515
import com.laytonsmith.abstraction.blocks.MCBlock;
1616
import com.laytonsmith.abstraction.blocks.MCBlockProjectileSource;
17+
import com.laytonsmith.abstraction.enums.MCDamageCause;
1718
import com.laytonsmith.abstraction.enums.MCMobs;
1819
import com.laytonsmith.abstraction.enums.MCRemoveCause;
1920
import com.laytonsmith.abstraction.enums.MCSpawnReason;
@@ -730,7 +731,8 @@ public String getName() {
730731

731732
@Override
732733
public String docs() {
733-
return "{id: <macro> The entityID | type: <macro> The type of entity being damaged | cause: <macro>"
734+
return "{id: <macro> The entityID | type: <macro> The type of entity being damaged"
735+
+ " | cause: <macro> One of " + StringUtils.Join(MCDamageCause.values(), ", ", ", or ", " or ")
734736
+ " | world: <string match>} Fires when any loaded entity takes damage."
735737
+ " {type: The type of entity the got damaged | id: The entityID of the victim"
736738
+ " | player: the player who got damaged (only present if type is PLAYER) | world | location"

src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.laytonsmith.abstraction.blocks.MCBlockFace;
1212
import com.laytonsmith.abstraction.enums.MCAction;
1313
import com.laytonsmith.abstraction.enums.MCFishingState;
14+
import com.laytonsmith.abstraction.enums.MCGameMode;
1415
import com.laytonsmith.abstraction.enums.MCTeleportCause;
1516
import com.laytonsmith.abstraction.events.*;
1617
import com.laytonsmith.annotations.api;
@@ -2082,7 +2083,9 @@ public String getName() {
20822083

20832084
@Override
20842085
public String docs() {
2085-
return "{newmode: <macro> gamemode being changed to | player: <macro>}"
2086+
return "{newmode: <macro> gamemode being changed to, one of "
2087+
+ StringUtils.Join(MCGameMode.values(), ", ", ", or ", " or ")
2088+
+ " | player: <macro>}"
20862089
+ " Fires when something causes a player's gamemode to change. Cancelling the event will"
20872090
+ " cancel the change. The mode itself cannot be modified."
20882091
+ " {player: player whose mode is changing | newmode}"

0 commit comments

Comments
 (0)