[SORUN] Plugin Çlışmadı! Sorun Nerede?

Secret_wither

Bedrock Kaşifi
En iyi cevaplar
0
Evet arkadaşalr neden çalışmadı?

Main.java:
Kod:
package com.farukalpay.oyuncugirdi;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;



public class Main extends JavaPlugin implements Listener{
   
   
    public void PlayerJoinEvent(Player event) { }
   


       
   
   public void PlayerJoinEvent(){
      Bukkit.getServer().getPluginManager().registerEvents(this, this); 
   }
   public boolean onCommand(CommandSender sender, Command cmd, String Label, String[] args){
      Player oyuncu = (Player) sender;
      Bukkit.broadcastMessage(ChatColor.GREEN + "(playerName) Adli oyuncu Servere Girdi!".replace("(playerName)", sender.getName()));
      oyuncu.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5, 1));

return false; 
     

      }
}

Plugin.yml:
Kod:
name: ilkpluginim
author: Secret_wither
verison: 1.0
main: com.farukalpay.oyunagirdi
 

Secret_wither

Bedrock Kaşifi
En iyi cevaplar
0
Maini bu şekilde yapıcaksın evente register edemessin onenablede sadece register olur eventlerin başına @eventhandler koyman gerek

Kod:
package com.farukalpay.oyuncugirdi;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;



public class Main extends JavaPlugin implements Listener {
 
 
    public void onEnable() {
        getLogger().info("AKTIF");
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
    }
 

   
    @EventHandler
    public void gir(PlayerJoinEvent e) {
    Bukkit.broadcastMessage(ChatColor.GREEN + e.getPlayer().getName()+" Adli oyuncu Servere Girdi!");
    e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5, 1));

   

      }
}


plugin yml de maini önce package yolunu sonra nokta koyup class adını belirtmen gerekli

Kod:
name: ilkpluginim
author: Secret_wither
verison: 1.0
main: com.farukalpay.oyuncugirdi.Main
[/code]
bu 2.plugin denememedei videoalra fln bakmadan yaptım 2. ye göre güzelmi?
 
Üst