-
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
Showing
15 changed files
with
242 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
plugins { | ||
id("java") | ||
} | ||
|
||
group = "fr.excaliamc.skyllia_value"; | ||
version = "1.1"; | ||
|
||
repositories { | ||
maven("https://repo.oraxen.com/releases") | ||
} | ||
|
||
dependencies { | ||
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT") | ||
compileOnly(project(":database")) | ||
compileOnly(project(":api")) | ||
compileOnly(project(":plugin")) | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
} | ||
|
||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
addons/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/API/API.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,22 @@ | ||
package fr.excaliamc.skyllia_value.API; | ||
|
||
import fr.excaliamc.skyllia_value.database.cache.CacheValue; | ||
|
||
import java.util.Map; | ||
|
||
public class API { | ||
public API() { | ||
} | ||
|
||
public CacheValue getCacheValue() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public Map<String, Double> getMaterialValue() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public void setMaterialValue(Map<String, Double> materialValue) { | ||
throw new RuntimeException(); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...ns/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/API/event/GainValueEvent.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,40 @@ | ||
package fr.excaliamc.skyllia_value.API.event; | ||
|
||
import fr.euphyllia.skyllia.api.skyblock.Island; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class GainValueEvent extends Event { | ||
private static final HandlerList handlerList = new HandlerList(); | ||
private final Island skyblockPlayer; | ||
private final double islandValue; | ||
private final double gainValue; | ||
|
||
public GainValueEvent(Island skyblock, double islandValue, double gainValue) { | ||
super(true); | ||
this.skyblockPlayer = skyblock; | ||
this.islandValue = islandValue; | ||
this.gainValue = gainValue; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlerList; | ||
} | ||
|
||
public @NotNull HandlerList getHandlers() { | ||
return handlerList; | ||
} | ||
|
||
public Island getSkyblockPlayer() { | ||
return this.skyblockPlayer; | ||
} | ||
|
||
public double getIslandValue() { | ||
return this.islandValue; | ||
} | ||
|
||
public double getGainValue() { | ||
return gainValue; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
addons/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/Main.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,19 @@ | ||
package fr.excaliamc.skyllia_value; | ||
|
||
import fr.excaliamc.skyllia_value.API.API; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
public final class Main extends JavaPlugin { | ||
|
||
public API getAPI() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public void onEnable() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public void onDisable() { | ||
throw new RuntimeException(); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
addons/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/database/MariaDBInit.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 fr.excaliamc.skyllia_value.database; | ||
|
||
import fr.euphyllia.skyllia.api.database.DatabaseInitializeQuery; | ||
import fr.euphyllia.skyllia.configuration.ConfigToml; | ||
import fr.euphyllia.skyllia.sgbd.DatabaseLoader; | ||
import fr.euphyllia.skyllia.sgbd.MariaDB; | ||
import fr.euphyllia.skyllia.sgbd.exceptions.DatabaseException; | ||
import fr.euphyllia.skyllia.sgbd.execute.MariaDBExecute; | ||
import fr.excaliamc.skyllia_value.Main; | ||
|
||
public class MariaDBInit extends DatabaseInitializeQuery { | ||
|
||
public MariaDBInit() { | ||
this.initializeDatabase(); | ||
} | ||
|
||
public static DatabaseLoader getDatabaseLoader() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
private void initializeDatabase() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public boolean init() throws DatabaseException { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public void createTable() throws DatabaseException { | ||
throw new RuntimeException(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
addons/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/database/ValueQuery.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,37 @@ | ||
package fr.excaliamc.skyllia_value.database; | ||
|
||
import fr.excaliamc.skyllia_value.models.ItemBrutStock; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.*; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class ValueQuery { | ||
|
||
public ValueQuery() { | ||
} | ||
|
||
public CompletableFuture<Boolean> hasIncrement(UUID islandId, String material, byte[] itemStackBytes, int incrementValue) { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public CompletableFuture<Boolean> hasDecrement(UUID islandId, String material, byte[] itemStackBytes, int decrementValue, Timestamp timestamp) { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public CompletableFuture<List<ItemBrutStock>> allMaterialOnIsland(UUID islandId) { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public CompletableFuture<Boolean> updateBlockValuePlot(String material, double value) { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public CompletableFuture<Map<String, Double>> getValueMaterial() { | ||
throw new RuntimeException(); | ||
} | ||
|
||
public CompletableFuture<Double> getValueIsland(UUID islandId) { | ||
throw new RuntimeException(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...s/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/database/cache/CacheValue.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,13 @@ | ||
package fr.excaliamc.skyllia_value.database.cache; | ||
|
||
import java.util.UUID; | ||
|
||
public class CacheValue { | ||
|
||
public CacheValue() { | ||
} | ||
|
||
public Double getValueIslandBySkyblockId(UUID skyblockId) { | ||
throw new RuntimeException(); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
addons/SkylliaValueAPI/src/main/java/fr/excaliamc/skyllia_value/models/ItemBrutStock.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,28 @@ | ||
package fr.excaliamc.skyllia_value.models; | ||
|
||
import java.sql.Timestamp; | ||
|
||
public record ItemBrutStock(String material, byte[] brut, int stock, Timestamp timestamp) { | ||
public ItemBrutStock(String material, byte[] brut, int stock, Timestamp timestamp) { | ||
this.material = material; | ||
this.brut = brut; | ||
this.stock = stock; | ||
this.timestamp = timestamp; | ||
} | ||
|
||
public String material() { | ||
return this.material; | ||
} | ||
|
||
public byte[] brut() { | ||
return this.brut; | ||
} | ||
|
||
public int stock() { | ||
return this.stock; | ||
} | ||
|
||
public Timestamp timestamp() { | ||
return this.timestamp; | ||
} | ||
} |
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