-
Notifications
You must be signed in to change notification settings - Fork 5
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
70e7bff
commit 7ebb3e1
Showing
3 changed files
with
65 additions
and
1 deletion.
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
30 changes: 30 additions & 0 deletions
30
src/main/java/com/github/yufiriamazenta/craftorithm/hook/impl/NexoHooker.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,30 @@ | ||
package com.github.yufiriamazenta.craftorithm.hook.impl; | ||
|
||
import com.github.yufiriamazenta.craftorithm.hook.ItemPluginHooker; | ||
import com.github.yufiriamazenta.craftorithm.item.ItemProvider; | ||
import com.github.yufiriamazenta.craftorithm.item.impl.NexoItemProvider; | ||
import crypticlib.lifecycle.AutoTask; | ||
import crypticlib.lifecycle.LifeCycle; | ||
import crypticlib.lifecycle.TaskRule; | ||
|
||
@AutoTask(rules = @TaskRule(lifeCycle = LifeCycle.ACTIVE)) | ||
public enum NexoHooker implements ItemPluginHooker { | ||
|
||
INSTANCE; | ||
|
||
@Override | ||
public ItemProvider itemProvider() { | ||
return NexoItemProvider.INSTANCE; | ||
} | ||
|
||
@Override | ||
public String pluginName() { | ||
return "Nexo"; | ||
} | ||
|
||
@Override | ||
public boolean hook() { | ||
return hookByEnabled(); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/github/yufiriamazenta/craftorithm/item/impl/NexoItemProvider.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,31 @@ | ||
package com.github.yufiriamazenta.craftorithm.item.impl; | ||
|
||
import com.github.yufiriamazenta.craftorithm.item.ItemProvider; | ||
import org.bukkit.OfflinePlayer; | ||
import org.bukkit.inventory.ItemStack; | ||
|
||
public enum NexoItemProvider implements ItemProvider { | ||
|
||
INSTANCE; | ||
|
||
@Override | ||
public String namespace() { | ||
return "nexo"; | ||
} | ||
|
||
@Override | ||
public String getItemName(ItemStack itemStack, boolean ignoreAmount) { | ||
return ""; | ||
} | ||
|
||
@Override | ||
public ItemStack getItem(String itemName) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ItemStack getItem(String itemName, OfflinePlayer player) { | ||
return null; | ||
} | ||
|
||
} |