Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Structure - changes
Browse files Browse the repository at this point in the history
- Change structure syntax to not load below 1.9.4
  • Loading branch information
ShaneBeee committed Mar 8, 2020
1 parent e2d6d5f commit 335df12
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
25 changes: 15 additions & 10 deletions src/main/java/tk/shanebee/bee/SkBee.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,21 @@ private void loadBoundElements() {
}

private void loadStructureElements() {
if (!this.config.ELEMENTS_STRUCTURE) {
log("&5Structure Elements &cdisabled via config");
return;
}
try {
addon.loadClasses("tk.shanebee.bee.elements.structure");
log("&5Structure Elements &asuccessfully loaded");
} catch (IOException ex) {
ex.printStackTrace();
pm.disablePlugin(this);
if (Skript.isRunningMinecraft(1, 9, 4)) {
if (!this.config.ELEMENTS_STRUCTURE) {
log("&5Structure Elements &cdisabled via config");
return;
}
try {
addon.loadClasses("tk.shanebee.bee.elements.structure");
log("&5Structure Elements &asuccessfully loaded");
} catch (IOException ex) {
ex.printStackTrace();
pm.disablePlugin(this);
}
} else {
log("&5Structure Elements &cdisabled");
log("&7 - Structure elements are only available on 1.9.4+");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@
public class EffLoadStructure extends Effect {

static {
if (Skript.isRunningMinecraft(1, 9, 4)) {
Skript.registerEffect(EffLoadStructure.class,
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [(|5¦[and] with entities)]",
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [and] [with] mirror front to back [(|5¦[and] with entities)]",
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [and] [with] mirror left to right [(|5¦[and] with entities)]");
}
Skript.registerEffect(EffLoadStructure.class,
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [(|5¦[and] with entities)]",
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [and] [with] mirror front to back [(|5¦[and] with entities)]",
"(load|paste) [structure] %string% at %location% [with rotation (0¦0|1¦90|2¦180|3¦270)] [and] [with] mirror left to right [(|5¦[and] with entities)]");
}

@SuppressWarnings("null")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
public class EffSaveStructure extends Effect {

static {
if (Skript.isRunningMinecraft(1, 9, 4)) {
Skript.registerEffect(EffSaveStructure.class, "save [structure] between %location% and %location% as %string%");
}
Skript.registerEffect(EffSaveStructure.class, "save [structure] between %location% and %location% as %string%");
}

@SuppressWarnings("null")
Expand Down

0 comments on commit 335df12

Please sign in to comment.