Worked patch on 1.20.1
This commit is contained in:
@@ -16,7 +16,7 @@ public class DonPayInteg implements ModInitializer {
|
||||
public static final String MOD_ID = "donpayinteg";
|
||||
public static final String NAME = "DonatePayIntegration";
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
||||
public static List<String> commands = new ArrayList<String>();
|
||||
public static List<String> commands = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
@@ -40,8 +40,8 @@ public class DonPayInteg implements ModInitializer {
|
||||
|
||||
if(j.getAndIncrement() % (20 * 2) == 0) {
|
||||
if (!commands.isEmpty()) {
|
||||
world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.getFirst());
|
||||
commands.removeFirst();
|
||||
world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.get(0));
|
||||
commands.remove(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -47,8 +47,8 @@ public class DonateThread extends Thread {
|
||||
|
||||
lastDonate = objects.getInt("id");
|
||||
|
||||
DonPayInteg.commands.addLast("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
|
||||
DonPayInteg.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
|
||||
DonPayInteg.commands.add("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
|
||||
DonPayInteg.commands.add(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
|
||||
|
||||
LOGGER.info("Exec donate #{}", lastDonate);
|
||||
Config config = ConfigHandler.load();
|
||||
|
||||
Reference in New Issue
Block a user