-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2300cbe
commit 460a5b9
Showing
31 changed files
with
631 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/java/sybyline/anduril/extensions/client/SubmodListScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package sybyline.anduril.extensions.client; | ||
|
||
import net.minecraft.client.gui.screen.Screen; | ||
import net.minecraft.util.text.*; | ||
|
||
public class SubmodListScreen extends Screen { | ||
|
||
public SubmodListScreen() { | ||
super(new TranslationTextComponent("anduril.submodlist")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/sybyline/anduril/scripting/api/server/IPermission.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package sybyline.anduril.scripting.api.server; | ||
|
||
import java.util.Set; | ||
|
||
public interface IPermission { | ||
|
||
public String key(); | ||
|
||
public String desc(); | ||
|
||
public Set<IPermission> children(); | ||
|
||
public default void add(IPermission permission) { | ||
if (!posesses(permission)) children().add(permission); | ||
} | ||
|
||
public default void remove(IPermission permission) { | ||
children().remove(permission); | ||
} | ||
|
||
public default boolean posesses(IPermission permission) { | ||
if (key().equals(permission.key())) { | ||
return true; | ||
} | ||
return children().stream().anyMatch(child -> child.posesses(permission)); | ||
} | ||
|
||
public default boolean exists() { | ||
return !key().isEmpty(); | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/sybyline/anduril/scripting/api/server/IPermissionConfigure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package sybyline.anduril.scripting.api.server; | ||
|
||
public interface IPermissionConfigure { | ||
|
||
public IPermission new_node(String node, String desc); | ||
|
||
public IPermission get_node(String node); | ||
|
||
public IPermission get_command(String command); | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/sybyline/anduril/scripting/api/server/IScriptServer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
package sybyline.anduril.scripting.api.server; | ||
|
||
import sybyline.anduril.scripting.api.data.IScriptData; | ||
|
||
public interface IScriptServer { | ||
|
||
public void command(String command, Object... inserts); | ||
|
||
public IScriptData persistant(); | ||
|
||
public Object ephemeral(); | ||
|
||
public IPermissionConfigure permissions(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/sybyline/anduril/scripting/client/ScriptButton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.