jonas.gph

Minecraft-Plugin in Java für 1.21.11 welches eine Nachricht sendet, wenn jemand zum ersten mal joint und wenn generell jemand joint. Auf Englisch und in lila schrift (siehe logo)#

[Viewing 1 image]

1 image attached
Kodari AI
KodariJan 1 at 4:33 pm 3,261 (v2)

I’ll create a join message plugin for Arcanum SMP with purple-themed messages.

ArcanumJoinMessages
A Minecraft plugin for Arcanum SMP that displays custom purple-themed join messages. Shows special welcome messages for first-time players and regular join messages for returning players. Messages are fully configurable and match the server's magical purple aesthetic.

Plugin created! Features:

  • First join message: Purple welcome with decorative symbols for new players

  • Regular join message: Purple entrance message for returning players

  • Fully configurable in config.yml

  • Uses &d (light purple) and &5 (dark purple) matching your logo

The plugin automatically detects first-time joins using hasPlayedBefore() and broadcasts the appropriate message to all players.

jonas.gph

jetzt ein random teleport plugin, welches einen user der das erste mal joint random wohin teleportiert aber nicht vom himmel aus, sondern er soll direkt auf dem boden dann landen und man soll auch random teleport mit befehl nutzen können, mit einem 3 minuten cooldown. auf english

Kodari AI
KodariJan 1 at 4:41 pm 4,539 (v2)

I’ll create a random teleport plugin with first-join teleportation and a command with cooldown.

Plan:

  • Create main plugin class with player data tracking

  • Create join listener for first-time players

  • Create random teleport command with 3-minute cooldown

  • Add safe location finder (ground level, not air)

  • Update config and plugin.yml

Plugin created with:

  • First-join random teleportation (1 second delay)

  • /rtp command with 3-minute cooldown

  • Safe ground-level teleportation (no water, lava, or air spawns)

  • Configurable radius (500-5000 blocks default)

  • Customizable messages and cooldown duration

jonas.gph

es sollen nur die chunks geladen werden, wo man hin teleportiert wird. nicht 1000 auf einmal

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 309
src/main/java/com/arcanum/randomtp/ArcanumRandomTP.java
package com.arcanum.randomtp;

import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

public class ArcanumRandomTP extends JavaPlugin {
    
    @Getter
    private static ArcanumRandomTP instance;
    
    private final Set<UUID> firstJoinPlayers = new HashSet<>();
    private final Map<UUID, Long> cooldowns = new HashMap<>();
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        
        getServer().getPluginManager().registerEvents(new FirstJoinListener(this), this);
        getCommand("rtp").setExecutor(new RandomTeleportCommand(this));
        
        getLogger().info("ArcanumRandomTP has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("ArcanumRandomTP has been disabled!");
    }
    
    public boolean hasJoinedBefore(UUID uuid) {
        return firstJoinPlayers.contains(uuid);
    }
    
    public void markAsJoined(UUID uuid) {
        firstJoinPlayers.add(uuid);
    }
    
    public boolean hasCooldown(UUID uuid) {
        if (!cooldowns.containsKey(uuid)) {
            return false;
        }
        long timeLeft = cooldowns.get(uuid) - System.currentTimeMillis();
        return timeLeft > 0;
    }
    
    public long getCooldownTime(UUID uuid) {
        if (!cooldowns.containsKey(uuid)) {
            return 0;
        }
        return Math.max(0, cooldowns.get(uuid) - System.currentTimeMillis());
    }
    
    public void setCooldown(UUID uuid) {
        long cooldownMillis = getConfig().getInt("cooldown-seconds", 180) * 1000L;
        cooldowns.put(uuid, System.currentTimeMillis() + cooldownMillis);
    }
}