burak51efe51
Somon Balığı Selam Vermeye Geldi
- Katılım
- 21 Nisan 2022
- Mesajlar
- 24
- Elmaslar
- 1
- Puan
- 1.995
- Konum
- Niğde
- Minecraft
- Burak_efe51
Discord:
Burak Efe#3826
Burak Efe#3826
Layri#0571
chat:
# If EssentialsChat is installed, this will define how far a player's voice travels, in blocks. Set to 0 to make all chat global.
# Note that users with the "essentials.chat.spy" permission will hear everything, regardless of this setting.
# Users with essentials.chat.shout can override this by prefixing text with an exclamation mark (!)
# Users with essentials.chat.question can override this by prefixing text with a question mark (?)
# You can add command costs for shout/question by adding chat-shout and chat-question to the command costs section."
radius: 150
edoux.
on chat:
if message does not start with "!":
cancel event
send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100] from player
if message starts with "!":
cancel event
send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world" from player
Burak Efe#3826
teşekkürlerCümlenin başına ! koyulursa, "world" dünyasındaki herkese mesaj gider (bunu değiştirebilirsiniz)
Cümlenin başına ! koyulmazsa oyuncunun 100 blok yakınındaki herkese mesaj gider (bunu da değiştirebilirsiniz)
JavaScript:on chat: if message does not start with "!": cancel event send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100] from player if message starts with "!": cancel event send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world" from player
Burak Efe#3826
teşekkürler fakat kodda bir hata var aşşağıda resmi var ben çözemedim rica etsem çözebilirmisinizCümlenin başına ! koyulursa, "world" dünyasındaki herkese mesaj gider (bunu değiştirebilirsiniz)
Cümlenin başına ! koyulmazsa oyuncunun 100 blok yakınındaki herkese mesaj gider (bunu da değiştirebilirsiniz)
JavaScript:on chat: if message does not start with "!": cancel event send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100] from player if message starts with "!": cancel event send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world" from player
edoux.
Muhtemelen skript sürümünüz güncel değil, bu özellik skript 2.2-dev36 sürümü ve daha ilerisi için geçerli. Skript sürümünüzü sunucunuzun sürümüne uygun olarak güncellerseniz sorun çözülürteşekkürler fakat kodda bir hata var aşşağıda resmi var ben çözemedim rica etsem çözebilirmisiniz
Burak Efe#3826
hocam dediğiniz sürümü indirdim fakat şimdide bu hatayı veriyorMuhtemelen skript sürümünüz güncel değil, bu özellik skript 2.2-dev36 sürümü ve daha ilerisi için geçerli. Skript sürümünüzü sunucunuzun sürümüne uygun olarak güncellerseniz sorun çözülür
edoux.
Kodun sorunsuz çalışması için 2.5.2 sürümü gerekliymiş :D her neyse eğer güncellemek istemezseniz aşağıdaki kod muhtemelen 2.2-dev36'da çalışacaktır. Önceki kodla arasında hiçbir fark yok sadece üstteki kodda isteğe bağlı ekstra özellik eklemiştim.hocam dediğiniz sürümü indirdim fakat şimdide bu hatayı veriyor
on chat:
if message does not start with "!":
cancel event
send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100]
if message starts with "!":
cancel event
send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world"
Burak Efe#3826
çalıştı hocam ama merak ettim eklediğiniz özellik neydiKodun sorunsuz çalışması için 2.5.2 sürümü gerekliymiş :D her neyse eğer güncellemek istemezseniz aşağıdaki kod muhtemelen 2.2-dev36'da çalışacaktır. Önceki kodla arasında hiçbir fark yok sadece üstteki kodda isteğe bağlı ekstra özellik eklemiştim.
JavaScript:on chat: if message does not start with "!": cancel event send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100] if message starts with "!": cancel event send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world"
Burak Efe#3826
hocam son olarak bir şey isteyebilirmiyimKodun sorunsuz çalışması için 2.5.2 sürümü gerekliymiş :D her neyse eğer güncellemek istemezseniz aşağıdaki kod muhtemelen 2.2-dev36'da çalışacaktır. Önceki kodla arasında hiçbir fark yok sadece üstteki kodda isteğe bağlı ekstra özellik eklemiştim.
JavaScript:on chat: if message does not start with "!": cancel event send "%player's display name% > %message%" to all players where [distance between player and player input is smaller than 100] if message starts with "!": cancel event send "%player's display name% > %subtext of message from characters 2 to (length of message)%" to all players in world "world"

_thread
hocam son olarak bir şey isteyebilirmiyim
aynı eşyaların stack lenmesini kapatabiliyormuyuz
hocam son olarak bir şey isteyebilirmiyim
aynı eşyaların stack lenmesini kapatabiliyormuyuz
command /deneme:
trigger:
give player cobblestone named "&a&fKırık Taş"
give player cobblestone named "&e&fKırık Taş"
give player cobblestone named "&d&fKırık Taş"
give player cobblestone named "&c&fKırık Taş"
give player cobblestone named "&b&fKırık Taş"
#Eşya isimlerinin başlarına görünmeyen renk kodları yazarsanız eğer eşyalar birbirine bağlanmayacaktır.
#Örnek: "&a&d&c&a&fKırık Taş" &e gibi renk kodlarını kullanarak istediğiniz kadar yerleştirerek eşyayı diğerlerinden ayırabilirsiniz.
Burak Efe#3826
hojam tam olarak böyle değil mesala kırdığımız toprak diğer kırdığımız toprakla birleşmicekJavaScript:hocam son olarak bir şey isteyebilirmiyim aynı eşyaların stack lenmesini kapatabiliyormuyuz command /deneme: trigger: give player cobblestone named "&a&fKırık Taş" give player cobblestone named "&e&fKırık Taş" give player cobblestone named "&d&fKırık Taş" give player cobblestone named "&c&fKırık Taş" give player cobblestone named "&b&fKırık Taş" #Eşya isimlerinin başlarına görünmeyen renk kodları yazarsanız eğer eşyalar birbirine bağlanmayacaktır. #Örnek: "&a&d&c&a&fKırık Taş" &e gibi renk kodlarını kullanarak istediğiniz kadar yerleştirerek eşyayı diğerlerinden ayırabilirsiniz.

_thread
hojam tam olarak böyle değil mesala kırdığımız toprak diğer kırdığımız toprakla birleşmicek
options:
eşyalar: dirt, stone, grass or cobblestone #başka bloklar için de kullanmak istiyorsan ""{@eşyalar}"" ayarına eşya ekleyin
#Eşyalar türkçe gelmiyor, skript gereği "aliases-english.sk" klasörünü türkçeleştirmeniz gerekli :)
on break:
if event-block is {@eşyalar}:
delete {_rastgeleblok::*}
set {_rastgeleblok::*} to "&0" and "&1" and "&2" and "&3" and "&4" and "&5" and "&6" and "&7" and "&8" and "&9" and "&a" and "&b" and "&c" and "&d" and "&e" and "&f" and "&k" and "&n" and "&0&1" and "&1&2" and "&2&3" and "&3&4" and "&4&5" and "&5&6" and "&6&7" and "&7&8" and "&8&9" and "&9&a" and "&a&b" and "&b&c" and "&c&d" and "&d&e" and "&e&f" and "&f&k" and "&k&n"
add random element of {_rastgeleblok::*} to {_yeniblok::*}
add random element of {_rastgeleblok::*} to {_yeniblok2::*}
add random element of {_rastgeleblok::*} to {_yeniblok3::*}
add random element of {_rastgeleblok::*} to {_yeniblok4::*}
add random element of {_rastgeleblok::*} to {_yeniblok5::*}
set {_yeniblok} to join {_yeniblok::*} by ""
set {_yeniblok2} to join {_yeniblok2::*} by ""
set {_yeniblok3} to join {_yeniblok3::*} by ""
set {_yeniblok4} to join {_yeniblok4::*} by ""
set {_yeniblok5} to join {_yeniblok5::*} by ""
delete event-block
drop event-block named "%{_yeniblok}%%{_yeniblok2}%&f%event-block%%{_yeniblok3}%%{_yeniblok4}%%{_yeniblok5}%"
#kaba taslak oldu fakat çalışıyor.
public class ChatListener extends PacketAdapter {
private final Main plugin;
private final int radius;
public ChatListener(Main plugin, int radius) {
super(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.CHAT);
this.plugin = plugin;
this.radius = radius;
}
@Override
public void onPacketReceiving(PacketEvent event) {
if (event.getPacketType() == PacketType.Play.Client.CHAT) {
Player sender = event.getPlayer();
String message = event.getPacket().getStrings().read(0);
Location senderLocation = sender.getLocation();
for (Player otherPlayer : Bukkit.getServer().getOnlinePlayers()) {
Location otherPlayerLocation = otherPlayer.getLocation();
double distance = senderLocation.distance(otherPlayerLocation);
if (distance <= radius) {
PacketContainer chatPacket = new PacketContainer(PacketType.Play.Server.CHAT);
chatPacket.getChatComponents().write(0, WrappedChatComponent.fromText(message));
chatPacket.getBytes().write(0, (byte) 0);
try {
ProtocolLibrary.getProtocolManager().sendServerPacket(otherPlayer, chatPacket);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
}
}
public void onAsyncPlayerChat(AsyncPlayerChatEvent event) {
Player sender = event.getPlayer();
String message = event.getMessage();
Location senderLocation = sender.getLocation();
int radius = 10;
for (Entity entity : sender.getNearbyEntities(radius, radius, radius)) {
if (entity instanceof Player) {
Player otherPlayer = (Player) entity;
otherPlayer.sendMessage(message);
}
}
}
Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!