-
Notifications
You must be signed in to change notification settings - Fork 11
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
dc7224e
commit 674e7b8
Showing
24 changed files
with
188 additions
and
94 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
4 changes: 1 addition & 3 deletions
4
.../mrgeneralq/sleepmost/enums/HookType.java → ...neralq/sleepmost/enums/SleepMostHook.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,10 +1,8 @@ | ||
package me.mrgeneralq.sleepmost.enums; | ||
|
||
public enum HookType { | ||
|
||
public enum SleepMostHook { | ||
PLACEHOLDER_API, | ||
SUPER_VANISH, | ||
GSIT, | ||
ESSENTIALS | ||
|
||
} |
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/me/mrgeneralq/sleepmost/flags/GsitSleepCmdFlag.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 me.mrgeneralq.sleepmost.flags; | ||
|
||
import me.mrgeneralq.sleepmost.flags.controllers.AbstractFlagController; | ||
import me.mrgeneralq.sleepmost.flags.types.BooleanFlag; | ||
|
||
public class GsitSleepCmdFlag extends BooleanFlag | ||
{ | ||
public GsitSleepCmdFlag(AbstractFlagController<Boolean> controller) | ||
{ | ||
super("gsit-sleep-cmd", controller, false); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/me/mrgeneralq/sleepmost/hooks/EssentialsHook.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,10 +1,10 @@ | ||
package me.mrgeneralq.sleepmost.hooks; | ||
|
||
import me.mrgeneralq.sleepmost.enums.HookType; | ||
import me.mrgeneralq.sleepmost.enums.SleepMostHook; | ||
import me.mrgeneralq.sleepmost.models.Hook; | ||
|
||
public class EssentialsHook extends Hook { | ||
public EssentialsHook() { | ||
super(HookType.ESSENTIALS, "Essentials"); | ||
super(SleepMostHook.ESSENTIALS, "Essentials"); | ||
} | ||
} |
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,10 +1,24 @@ | ||
package me.mrgeneralq.sleepmost.hooks; | ||
|
||
import me.mrgeneralq.sleepmost.enums.HookType; | ||
import dev.geco.gsit.api.GSitAPI; | ||
import dev.geco.gsit.objects.GetUpReason; | ||
import me.mrgeneralq.sleepmost.enums.SleepMostHook; | ||
import me.mrgeneralq.sleepmost.models.Hook; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.block.BlockFace; | ||
import org.bukkit.entity.Player; | ||
import org.bukkit.entity.Pose; | ||
|
||
public class GsitHook extends Hook { | ||
|
||
public GsitHook() { | ||
super(HookType.GSIT, "GSit"); | ||
super(SleepMostHook.GSIT, "GSit"); | ||
} | ||
|
||
public void setSleepingPose(Player player, boolean sleeping){ | ||
if(sleeping) | ||
GSitAPI.createPose(player.getLocation().getBlock().getRelative(BlockFace.DOWN), player, Pose.SLEEPING); | ||
else | ||
GSitAPI.removePose(player, GetUpReason.GET_UP); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/me/mrgeneralq/sleepmost/hooks/PlaceholderAPIHook.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,10 +1,10 @@ | ||
package me.mrgeneralq.sleepmost.hooks; | ||
|
||
import me.mrgeneralq.sleepmost.enums.HookType; | ||
import me.mrgeneralq.sleepmost.enums.SleepMostHook; | ||
import me.mrgeneralq.sleepmost.models.Hook; | ||
|
||
public class PlaceholderAPIHook extends Hook { | ||
public PlaceholderAPIHook() { | ||
super(HookType.PLACEHOLDER_API, "PlaceholderAPI"); | ||
super(SleepMostHook.PLACEHOLDER_API, "PlaceholderAPI"); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/me/mrgeneralq/sleepmost/hooks/SuperVanishHook.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,12 +1,12 @@ | ||
package me.mrgeneralq.sleepmost.hooks; | ||
|
||
import me.mrgeneralq.sleepmost.enums.HookType; | ||
import me.mrgeneralq.sleepmost.enums.SleepMostHook; | ||
import me.mrgeneralq.sleepmost.models.Hook; | ||
|
||
public class SuperVanishHook extends Hook { | ||
|
||
public SuperVanishHook() { | ||
super(HookType.SUPER_VANISH, "SuperVanish"); | ||
super(SleepMostHook.SUPER_VANISH, "SuperVanish"); | ||
} | ||
|
||
} |
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.