Compare commits
4 Commits
af96c5a412
...
f36e6b1aa0
Author | SHA1 | Date | |
---|---|---|---|
f36e6b1aa0 | |||
629695ac21 | |||
8bf35896f4 | |||
1d34a3040d |
18
TODO.md
18
TODO.md
@ -3,15 +3,17 @@
|
||||
- [x] deathBan reset
|
||||
- [x] voids exchanges
|
||||
- [x] /void give négatives values
|
||||
- [+] Make Discord Webhoook for item changes
|
||||
- [+] chest name
|
||||
- [+] Show next Item
|
||||
- [x] Make Discord Webhoook for item changes
|
||||
- [x] chest name
|
||||
- [x] Show next Item
|
||||
- [x] /void manage bring
|
||||
- [+] /void give afficher title
|
||||
- subtitle + chat
|
||||
- [ ] i18n
|
||||
- [ ] /void manage bring
|
||||
- [ ] Dupe bug (respawn) -> Gamerule
|
||||
- [+] Double Check Inventory reset on die
|
||||
- [+] Annonce
|
||||
- [+] Find Map : 51 (250, 300)
|
||||
- [+] Dupe bug (respawn)
|
||||
- [-] i18n
|
||||
- [ ] Events
|
||||
- [ ] Command completions
|
||||
- [ ] Annonce
|
||||
- [ ] Double Check Inventory reset on die
|
||||
- [ ] More descriptive /void commands
|
||||
|
@ -20,6 +20,9 @@ public class BanHourly implements Listener{
|
||||
@EventHandler
|
||||
public void died(PlayerDeathEvent e){
|
||||
DatabaseManager.getInstance().setDeath(e.getPlayer().getUniqueId());
|
||||
e.setKeepInventory(true);
|
||||
e.setKeepLevel(false);
|
||||
e.getDrops().clear();
|
||||
e.getPlayer().kick(Component.text("Vous etes mort dans la dernière heure... Patientez la prochaine!"), Cause.BANNED);
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import java.util.HashMap;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class DatabaseManager {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ovh.herisson.thevoidroad.Event;
|
||||
package ovh.herisson.thevoidroad;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ovh.herisson.thevoidroad.Entity;
|
||||
package ovh.herisson.thevoidroad;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
@ -24,12 +24,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import ovh.herisson.thevoidroad.DatabaseManager;
|
||||
import ovh.herisson.thevoidroad.DiscordWebhook;
|
||||
import ovh.herisson.thevoidroad.TheVoidRoad;
|
||||
import ovh.herisson.thevoidroad.Voids;
|
||||
import ovh.herisson.thevoidroad.Event.HourEvent;
|
||||
import ovh.herisson.thevoidroad.util.Tuple;
|
||||
|
||||
//Unique, so singleton patern
|
||||
public class Merchand implements Listener{
|
||||
@ -89,6 +83,7 @@ public class Merchand implements Listener{
|
||||
m.setGlowing(true);
|
||||
m.setInvulnerable(true);
|
||||
m.customName(Component.text(names.get(new Random().nextInt(names.size()))));
|
||||
m.setCustomNameVisible(true);
|
||||
inv = Bukkit.createInventory(null, 9, Component.text(m.getName()));
|
||||
Bukkit.getServer().forEachAudience((a) -> {
|
||||
if(a instanceof Player ply){
|
||||
@ -177,4 +172,8 @@ public class Merchand implements Listener{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void teleport(Location location) {
|
||||
m.teleport(location);
|
||||
}
|
||||
}
|
@ -2,9 +2,9 @@ package ovh.herisson.thevoidroad;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import ovh.herisson.thevoidroad.Commands.VoidCommands;
|
||||
import ovh.herisson.thevoidroad.Entity.Merchand;
|
||||
import ovh.herisson.thevoidroad.Event.HourEvent;
|
||||
import ovh.herisson.thevoidroad.VoidCommands;
|
||||
import ovh.herisson.thevoidroad.Merchand;
|
||||
import ovh.herisson.thevoidroad.HourEvent;
|
||||
|
||||
public class TheVoidRoad extends JavaPlugin{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ovh.herisson.thevoidroad.util;
|
||||
package ovh.herisson.thevoidroad;
|
||||
|
||||
public class Tuple<X, Y> {
|
||||
public final X x;
|
@ -1,4 +1,4 @@
|
||||
package ovh.herisson.thevoidroad.Commands;
|
||||
package ovh.herisson.thevoidroad;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -17,7 +17,7 @@ import net.kyori.adventure.text.Component;
|
||||
import ovh.herisson.thevoidroad.DatabaseManager;
|
||||
import ovh.herisson.thevoidroad.TheVoidRoad;
|
||||
import ovh.herisson.thevoidroad.Voids;
|
||||
import ovh.herisson.thevoidroad.Entity.Merchand;
|
||||
import ovh.herisson.thevoidroad.Merchand;
|
||||
|
||||
public class VoidCommands implements CommandExecutor, TabCompleter{
|
||||
private final Merchand m = Merchand.getInstance();
|
||||
@ -76,6 +76,14 @@ public class VoidCommands implements CommandExecutor, TabCompleter{
|
||||
sender.sendMessage("You can't teleport!");
|
||||
}
|
||||
break;
|
||||
case "bring":
|
||||
if(sender instanceof Player ply && m.getLocation() != null){
|
||||
m.teleport(ply.getLocation());
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case "balance":
|
||||
if(args.length < 5) return false;
|
||||
switch (args[2]) {
|
Loading…
Reference in New Issue
Block a user