#help-archived

1 messages ยท Page 92 of 1

naive goblet
#

You donโ€™t need to declare the k and v twice Verilyzed

vernal spruce
#

@tardy lance openedInventories.put(UUID,Inventory)

tardy lance
#

okay thanks, i will give it a try.

#

@naive goblet okay, thanks

naive goblet
#

Map<K, V> map = new HashMap<>();

vernal spruce
#

i usually define them so theyr locked on what types i want..

naive goblet
#

Yeah

tardy lance
#

@naive goblet yeah, i changed it ๐Ÿ™‚

naive goblet
#

Is that for inventories?

vernal spruce
#

yeah he wants to make a way

#

to store them

naive goblet
#

Okay HashMap is probably good then ๐Ÿ‘Œ

tardy lance
#

Okay, how do i get a value from a Hashmap? So if i give him the uuid that he gives me the inventory

naive goblet
#

So the K

#

Which is the Player in this case or the UUID

#

Works as keys

#

So if you have a UUID or the K value you can always get the value

#

Map#get(UUID)

tardy lance
#

okay thanks ๐Ÿ˜„

naive goblet
#

Would give the Inventory or eventually null

tardy lance
#

Ohh this is very practical with Hashmaps ๐Ÿ˜‚

naive goblet
#

Maps in general

tardy lance
#

yeah

#

never used them

#

never used java for programming

naive goblet
#

Well you should definitely learn about data structures as they come handy frequently

tardy lance
#

i am c# "main". But now i want to make some minecraft plugins ๐Ÿ˜„

naive goblet
#

Ah yeah

#

Minecraft Bedrock?

tardy lance
#

c# for unity games ๐Ÿ˜„

vernal spruce
#

Ahh unity good ol days

naive goblet
#

I mean doesnโ€™t Minecraft has Bedrock in C#?

tardy lance
#

Oh idk that

vernal spruce
#

Yeah but its extremly limited as there is no spigot api or anything close

#

You are hooking directly to the server..

naive goblet
#

Yeah

tardy lance
#

So, how do i call those methods from My InventoryManager.java class on my Command.java class? And do i need to list my Inventorymanager in my Main class?

naive goblet
#

Yeah make an efficient getter in main

tardy lance
#

ehmm ๐Ÿ˜‚

naive goblet
#
class Main extends JavaPlugin {
  private InventoryManager invMan;
  @Override public void onEnable() {
    invMan = new InventoryManager();
  }
  public InventoryManager getInvMan() {
    return invMan;
  }
}
class Command implements CommandExecutor {
private final Main main;
public Command(Main instance) {
  this.main = instance;
}
void method() {
  main.getInvMan();
}```
#

Hi Mr.T

frigid ember
#

i have a skyisland plugin on my server (iridum skyblock), and when you gather items (that are pretty easy to get diamonds, emeralds ect), and /home or /warp home the player takes everything off the island, and can smuggle stuff in. Does anyone know any type of fix i could use to avoid this?

burnt dock
#

Yo, anyone know why my fly speed with essentials isnt changing. Other speeds are working

tardy lance
#

Ehm @naive goblet ?

Big oof error?

Fatal error trying to convert VerilyzedsCoolesDing v1.0.0:de/verilyzed/economy/commands/BuyHorseCommand.class
org.bukkit.plugin.AuthorNagException: No legacy enum constant for HORSE_SPAWN_EGG

tiny dagger
#

seems like the version you're using doesn't have that enum anymore

tardy lance
#

idk i maybe renamed it ?

tiny dagger
#

well if it was wrong it wouldn't compile

subtle blade
#

Did you forget to define api-version: 1.13 in your plugin.yml?

tiny dagger
#

oh

subtle blade
#

(or 1.14, whatever)

tardy lance
#

i didnt define everything

tiny dagger
#

that might be it

tardy lance
#

My plugin.yml:

#

name: VerilyzedsCoolesDing
version: 1.0.0
main: de.verilyzed.main.Main
description: My plugin for all things!
author: Verilyzed
commands:
kilian:
usage: /<command>
description: Benutzen
npc:
usage: /<command>
description: Spawn npcs
money:
usage: /<command>
description: Check money
admin:
usage: /<command>
description: admincommands
buyhorse:
usage: /<command>
description: buy horses

subtle blade
#

You're missing api-version

#

api-version: 1.13 (or 1.14 if you're using features added then)

tardy lance
#

so how can i implement this?

subtle blade
#

Literally put that string of text in your plugin.yml dude lol

#

I don't know how much clearer I can say it

tardy lance
#

ah okay ๐Ÿ˜‚

subtle blade
#

Should fix that error and you can use modern Material constants

tardy lance
#

yea know it fixed it ๐Ÿ˜„

lament wolf
#

Hello! When I do on a bungeecord plugin:

#
                ProxiedPlayer player = plugin.getProxy().getPlayer(event.getReceiver().toString());
#

how wa can do that since it's bungeecord, so there is no receiver/player, right ?

#

Btw my event is PluginMessageEvent event

#

So spigot send to bungee a message, bungee get it, but there is no player ?

wary viper
#

hi! how can i change my username on spigotmc?

subtle blade
#

?changename

worldly heathBOT
#

Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.

wary viper
#

How much money do I need to donate?

tardy lance
#

it works @naive goblet @vernal spruce ๐Ÿ˜„ Thanks for your help

floral isle
#

Hi someone know a method for create client sided npc?

dusty topaz
#

Client side NPC?

#

Do you mean an NPC only one player can see

#

if so, you just have to send the packet to only the player you want to be able to see it

floral isle
#

Yes

#

@dusty topaz you know a good method ?

dusty topaz
#

create an npc as normal, then just send the packet to the player you want to be able to see it

floral isle
#

Using protocollib?

dusty topaz
#

not necessarily

floral isle
#

Using NMS code but some method are restricted

#

Ok thans i asked It beacuse i developing an anticheat

wary viper
#

I donated $ 10, how i will know status did I get?

pastel condor
naive goblet
#

I'd use lambda

#

Much cleaner and easier to look at in my opinion.

#

Also make the tabs and spaces indentations consistent, doesn't render nice.

bronze marten
#

Wdym not working correctly

#

What does it do? What do you expect?

naive goblet
#

fierceeo idk if getLastColors is reliable. Maybe stripColors?

chilly cairn
#

I have iron golem farm on latest spigot and villagers just randomly go out of their cages, any ideas why?

#

I tired editing entity activating range and even that does not work

#

It was fine on older versions

bronze marten
#

Cages ๐Ÿ˜ณ

#

Poor villagers

#

Treat them nicely ok

pastel condor
#

@naive goblet but doesn't strip colors remove the colors?

naive goblet
#

makes them &

#

iirc

pastel condor
#

what?

wary viper
#

I donated $ 10, how i will know status did I get?
๐Ÿ™ƒ

bronze marten
#

Stripcolor removes colors yeah

#

Doesnt leave the color codes

misty quarry
#

if i have a house, on a multi player server, could i use world edit to copy that house, and paste it into another multiplayer world? how?

subtle blade
#

If you're an administrator, sure. You could save the schematic and grab it from the file system

#

Otherwise, no. You'd have to use some 3rd party mod. Schematica or World Downloader

clever hornet
#

Whats a good free easy to use custom mobs plugin for spigot 1.8.8 that isnt mythicmobs

tardy lance
#

how can i define some permissions as standard op permissions?

#

or as not standard

naive goblet
#

use a permission plugin

#

else you might wanna edit perms in plugin.yml

grand aurora
#

Is there any way to use an Entity Damage Event to detect a player's death?

#

I need to get the cause of the death but It does not seem to be triggered when a player dies from damage

full mist
#

Where can I advertise?

cloud sparrow
#

nowhere

subtle blade
#

@grand aurora PlayerDeathEvent, Player#getLastDamageCause()

grand aurora
#

Thank you so much!

subtle blade
#

Returns an EntityDamageEvent, can cast and fetch whatever from there

sturdy oar
#

Choco when do you think 1.8 support will be dropped from BungeeCord

#

(I hope ASAP)

subtle blade
#

It likely won't. Bungee isn't Bukkit and they, for the most part, do not adhere to the same guidelines

#

Bungee can still reasonably maintain 1.8 support. It's a proxy after all

#

It's not like it knows anything about the server or the client (content-wise). Just that it needs to bridge the two

lilac quarry
#

When I sell spawners on chestcommands with command 'es give {player} creeper 1 1' it says "You do not have permissions to do that". How can I fix that

young dawn
#

Whenever I try and run my new bungee network, it says "if you wish to use IP forwarding, please enable it in your bungeecord config as well" but I already did that. I also disabled online mode in both of my spigot servers and enabled bungeecord.

wanton vine
#

97.73% 169.38% 146.01 s 84.69 ms 1.0 1.7k Full Server Tick
Learn More

  80.36%     139.31%    120.05 s        69.65 ms      20          35.0k        Scheduler - Sync Tasks
  80.36%     139.24%    120.05 s        69.62 ms      20          35.0k        Tasks
#

How do i fix these timings

dusty topaz
#

the timings built into spigot aren't great. i'd recommend getting a timings report from a certain fork :p

rapid yacht
#

Iโ€™ve wanted to create spigot plugins for a while now. I know some java, not too much. And have started creating some simple plugins by following some tutorials (join+leave messages) do you guys recommend I go back and fully learn java? Or continue with the spigot plugins?

radiant pollen
#

I learned Java by making Spigot plugins.

#

To me, it's easier to learn a programming language when you have a goal in mind and how the language you're learning applies to that goal.

subtle blade
#

Just know to differentiate between the API and Java. Do your research as you go. If you don't understand something, Google it and learn

rapid yacht
#

That makes sense

radiant pollen
#

If you're following Spigot tutorials, and the Java gets confusing, you can always go back and research something.

subtle blade
#

You should have a firm understanding of what is and is not standard Java

radiant pollen
#

^

rapid yacht
#

Alright, so I should continue with the spigot plugins and go back if I donโ€™t understand things?

subtle blade
#

If you have questions, I'm sure someone here (myself included) can guide you to the appropriate place

#

Yes

rapid yacht
#

Awesome. I appreciate it guys

subtle blade
#

I find that learning through plugins is great so long as you're willing to do your own research. Seeing what you write be applied in real time and to give you immediate feedback is rewarding and motivating.

rapid yacht
#

Yeah ๐Ÿ˜„ it felt great to see some of my plugins start working

subtle blade
#

but yea, quick questions, I'm sure most here are willing to either help or link articles

#

Try to avoid creating a thread on the forums for more basic questions. A Google search will often yield answers and if not, if it's a small issue, the Discord is the more appropriate avenue for assistance

#

Big issue that requires discussion about the API? Forums!

rapid yacht
#

Sounds good!

#

And here comes the big question

#

Eclipse or IntelliJ o_O

#

Or notepad ๐Ÿ˜„

warped skiff
#

notepad++

#

personally

subtle blade
#

It's a matter of preference. Try both

#

I prefer Eclipse, another prefers IntelliJ, md and others prefer NetBeans

#

Hell, I remember seeing someone say the use Code::Blocks

granite hedge
subtle blade
#

Think that might have been for C++ though ;P

rapid yacht
#

Iโ€™ve looked over my options, and Iโ€™ve chosen notepad

dusty topaz
#

i hope that isn't serious

#

the only thing worse than that would be using eclipse

subtle blade
#

I'M RIGHT HERE

cloud sparrow
#

no point to start arguments between IDEs as it's a matter of preference and people are just salty.

#

I feel it's a fair competition between both IDEs with their ups and downs ofc.

dusty topaz
#

anyone who argues after that comment needs to relearn sarcasm

cloud sparrow
#

Lol, eh I only do it after people repeat the boring sarcasm multiple times

dusty topaz
#

much like when i'm programming, everything i say (or write) is 100% unoriginal!

sudden elk
#

!hastebin

#

!help

frigid ember
#

?paste

worldly heathBOT
bright forge
#

@sturdy oar Supporting 1.8 is not hard as supporting 1.7 so it will probably be kept

#

1.7 was dropped for a good reason

#

I think 1.7 doesn't even have netty, apart from some entity rewrite and lack of uuid system

subtle blade
#

UUIDs were added in 1.7.6 iirc, so the latest (1.7.10) had them at least

quartz trench
#

does anyone know if this event fires for naturally spawned wandering traders

#

or know a way to force a natural spawn

#

and I cant get another natural spawn to try and troubleshoot

#

im currently afking in a test server to try and get some traders to naturally spawn lol

#

it works for natrually spawned villagers now im rly confused

long hollow
#

Hello i have a problem with PluginManager.

#

I have my ghost system work in 1.8 (i edit PluginManager with my PluginManager) but in 1.12.2 it doesn't work i have this error : java.lang.IllegalArgumentException: Can not set org.bukkit.plugin.SimplePluginManager field org.bukkit.craftbukkit.v1_12_R1.CraftServer.pluginManager to fr.florgiox.xxx.api.ghostplayers.v12.GhostPluginManager

#

How can i fix this in 1.12.2 ?

subtle blade
#

oh dear

#

what the hell are you doing

#

lol

#

This sounds almost as bad as the resource that forcibly injects its own entity tracker into the server through CraftBukkit and breaks my plugins

long hollow
#

Wut ?

subtle blade
#

You're trying to replace Bukkit's plugin manager with your own. Don't do that

long hollow
#

Why ?

subtle blade
#

It's inevitably going to break every single plugin on the server if you fuck something up

long hollow
#

It work good on 1.8

subtle blade
#

Yea, welcome to 1.15.2. 5 years later

#

You have to realize that every single plugin is loaded through Bukkit's plugin manager

#

They rely heavily on knowing that it's implemented by Bukkit

long hollow
#

Yes but how can i do that

subtle blade
#

What possibly could you be doing with a plugin manager implementation? Why do you want to replace the one supplied by Bukkit?

long hollow
#

For change specific event

velvet halo
#

you can modify most things that you need anyways?

subtle blade
#

So you're even messing with the event calls? That's WORSE

#

What are you doing

fair abyss
#

really, what's that event?

long hollow
#

shouldFire

fair abyss
#

full name?

velvet halo
#

You can literally manipulate most default Minecraft events by registering listeners that do certain cancellations. >.<

pastel condor
#

anyone know how to create an entity in spigot?

long hollow
#

I would like to edit plugin manager for my ghost system

hallow surge
#

how do I do this
ChatColor.translateAlternativeColorCodes('&', config.getString(path));
but with a list

ashen stirrup
#

Probably just easier to do a for loop

hallow surge
#

okay

#

ill check in a for loop

quartz trench
#

anyone know how to force a natural spawn of a wandering trader

#

through spigot api or commands or anything

ashen stirrup
#

Pretty sure thereโ€™s a spawnEntity method under World

quartz trench
#

thanks I will check that out

hallow surge
#

@ashen stirrup when i put it in my for loop it wants me to change it to a string rather than a string list

long hollow
#

So for explain, I would like to cancel only all fireEvent in my pluginManager for replace with by mine

fair abyss
#

just cancel event before all others

#

and call yours

ashen stirrup
#

For each string in the string list, colorise it and add it to an array list or something or concatenate it.

hallow surge
#
ChatColor.translateAlternateColorCodes('&', plugin.loadString("HelpMessage"));
#

what alternative to this do you propose

fair abyss
#

you want to color all list huh?

hallow surge
#

I want to color different strings in the list

fair abyss
#

different strings?

hallow surge
#

Like
help:

  • &bhi
  • &cwiw
ashen stirrup
#

Use concatenation

fair abyss
#

first of all plugin.loadString("HelpMessage") wont return list

quartz trench
#

just run ChatColor.translateAlternateColorCodes('&', on the whole array/list

#

?

hallow surge
#

ill try that out

long hollow
#

just cancel event before all others
@fair abyss Yes but how ?

fair abyss
#

@hallow surge example

            player.sendMessage(ChatColor.translateAlternateColorCodes('&', msg))
        }
#

@long hollow there is event priority

#

LOWEST Event call is of very low importance and should be ran first, to allow other plugins to further customise the outcome

#

if you annotate with this

#

your listener will run first

#
public void on..```
hallow surge
#

@fair abyss its really weird that just deletes the string with the & on it

fluid marlin
#
    public void entityMetadata(byte m) {
        try {
            Field field = Entity.class.getDeclaredField("W");
            field.setAccessible(true);
            DataWatcherObject<Byte> datawatcherObject = (DataWatcherObject<Byte>) field.get(null);
            DataWatcher dataWatcher = new DataWatcher(null);
            dataWatcher.register(datawatcherObject, m);
            PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entityID, dataWatcher, true);
            sendPacket(packet);
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }

This code worked for me in 1.13 to make my NPC crouch, anyone knows why it just doesn't do anything now on 1.14? (no errors either)

#

(please ping me if you answer)

long hollow
#

@fair abyss It's possible to go mp ?

fair abyss
#

mp?

long hollow
#

private message ^^'

fair abyss
#

probably yes

#

@hallow surge didn't understand?

#

@fluid marlin theres librarys for changing entity's metadata

fluid marlin
#

?

#

this is NMS

fair abyss
#

and theres library for them too

fluid marlin
#

LivingEntity#setMetadata wont work.

fair abyss
#

just not by spigot

fluid marlin
#

I'm sending a packet.

#

I'm not looking to use outside librarys

pastel condor
#

how can I make an armor stand a living entity?

fair abyss
#

casting it?

fluid marlin
#

I'm looking to use NMS to make my npc crouch on 1.14

pastel condor
#

oh okay

fluid marlin
#

I have code that worked on 1.13 but I'm sure what's wrong with it now

pastel condor
#

thanks

fluid marlin
#

Been trying to solve it for the past hour and got nowhere

pastel condor
#

how can I set a living entities yaw?

subtle blade
#

teleport() it

#

get its location, change the yaw, teleport

pastel condor
#

oh okay

#

thanks

fair abyss
#

choco, are you there

#

do you know about, spigot-site api's problem with spigot's cloudfalre

tardy lance
fair abyss
#

send code please

#

something is null, that we cant understand without code

tardy lance
#

It is this line of code:

fm.createUserFile();

keen compass
#

you need to create the file before getting the file

#

have no idea what your datamanager code looks like

#

but, generally can't get something if it doesn't exist ๐Ÿ˜›

tardy lance
fair abyss
#

creating file for each player when join

#

meh

#

store all data in a map

#

and save them on shutdown

subtle blade
#

My only guess

keen compass
#
File userdata = new File(Main.getInstance().getDataFolder() + "/userdata/" + uuid)

what kind of file are you trying to create here? yml file?

fair abyss
#

thanks choco

tardy lance
#

no only file

fair abyss
#

arent you creating this for all player?

tardy lance
#

@keen compass it worked without that method fine. but i wanted to clean it up

#

yes i am

fair abyss
#

dont do this

tardy lance
#

if the player wasnt on the server before it creates a file

fair abyss
#

save everything in map

#

and then create your file on shutdown

#

you can load every data to map on enable

tardy lance
#

idk something about maps

fair abyss
#

learn it

tardy lance
#

lol

pastel condor
#

instead of using teleport to set an entities yaw, is there any way I can directly modify it?

keen compass
#

it needs to be changed to this then

File userdata = new File(Main.getInstance().getDataFolder() + "/userdata/", uuid);

if you don't change it to that, what it actually creates is a file named /userdata/(usersUUID)

fair abyss
#

@pastel condor dont think so

pastel condor
#

๐Ÿ˜ฆ

fair abyss
#

probably not with spigot api

pastel condor
#

I'm trying to make a vehicle plugin

fair abyss
#

maybe sending with special packets

pastel condor
#

oh

fair abyss
#

and im not into this

pastel condor
#

kk

tardy lance
#

it needs to be changed to this then

File userdata = new File(Main.getInstance().getDataFolder() + "/userdata/", uuid);

if you don't change it to that, what it actually creates is a file named /userdata/(usersUUID)
@keen compass this doesn't work.

#

if i make a comma over there, it gives me an error

subtle blade
#

instead of using teleport to set an entities yaw, is there any way I can directly modify it?
That is the way to directly modify it

#

When you change it on the server, a packet has to be send to the client telling it that it's been teleported

tardy lance
#

so what kind of map should i use? @fair abyss

keen compass
#

what kind of error does it give?

#

shouldn't give any errors o.O

subtle blade
#

When you change an entity's position, it has been teleported. Period.

pastel condor
#

but I only want to change the yaw, not the location

subtle blade
#

pitch & yaw are location

tardy lance
#

oooops

pastel condor
#

like cords

#

I want to keep cords the same

subtle blade
#

pitch & yaw are location

pastel condor
#

just change the yaw and pitch

subtle blade
#

Consider these values much like x, y and z. They are a position and rotation in the world. They are one in the same when considering teleportation

pastel condor
#

oh okay

subtle blade
#

You can change the pitch and yaw on the server directly all you want but if a teleportation packet is not sent to the client, it will not update

#

A teleportation has to be made

pastel condor
#

I simply want to rotate the players head

keen compass
#

You can use packets to do it without updating location

tardy lance
#

@keen compass The constructer File is undefined

keen compass
pastel condor
#

oh okay

keen compass
#

That packet updates the entities rotation which is the pitch and yaw

subtle blade
#

Actually, there should be a setRotation() in later versions

#

Yep

keen compass
#

There we go

pastel condor
#

oh thanks

keen compass
#

was trying to look for that

#

couldn't find it XD

subtle blade
#

Forgot about that for a bit

pastel condor
#

thats what I need ๐Ÿ™‚

tardy lance
#

@fair abyss do you mean a hashmap?

subtle blade
#

I think it's 1.15+

#

Just be mindful of that

pastel condor
#

I see

#

okay

fair abyss
#

you should learn java first @tardy lance

subtle blade
#

Maybe 1.14 if I'm being generous. I know it was recent lol

pastel condor
#

okay lol

tardy lance
#

because i worked once with hashmaps @fair abyss

keen compass
#

can always resort to packets

#

if you need it for earlier versions

subtle blade
#

I mean, yea

#

but API

#

๐Ÿ˜„

keen compass
#

Another example of not using outdated versions ๐Ÿ˜›

fair abyss
#

another example of not using otdated versions: Some events can be trigger while it or it's part is null

pastel condor
#

anyone know how I can get (not set) a players yaw or pitch?

fair abyss
#

getLocation()

keen compass
#

its part of the location

pastel condor
#

I see thanks

keen compass
#

getLocation().getYaw() and getPitch() if I remember right

#

do note that the yaw can be negative. It is dependent on the way they turned

#

so, negative means spinning to the left and positive means spinning to the right. So you can have -180 and 180 which are the same lol

subtle blade
#

Yaw and pitch is fucked in Minecraft. Heh

#

Really, the entire coordinate system is

#

North is -z for instance

keen compass
#

lol was about to say

fair abyss
#

isn't it forked from other's code

subtle blade
#

Which makes sense in the context of a game engine, but not at all in world coordinates

keen compass
#

Yaw shouldn't contain negative values

#

not entirely sure why they implemented it that way

subtle blade
#

Yea that's a weird one

#

Maybe we can blame the swedes on that?

keen compass
#

but because they implemented it that way you can also have -0 and 0

#

so if you are not aware of that you can have getYaw() == 0 return false all because it is -0

subtle blade
#

LMAO. That I did not know

#

and I hate it

#

Wait how does Math.abs() handle -0? Does it make it 0?

keen compass
#

absolute removes the sign

subtle blade
#

I still don't want to have to abs my yaw ๐Ÿ˜ฆ

fair abyss
keen compass
#

That is why generally circles do not incorporate negative values. Since I mean, not like you should be able to get anything else other then what is defined XD

#

your circles shouldn't be turning into polygons

fair abyss
#

my english wont enough to understand one upper ^^

subtle blade
#

I may be speaking out of my ass here but I think -0 == 0 will always be true because the compiler will optimize -0 to 0

fair abyss
#

im thinking that too

keen compass
#

Is that true for all the java versions?

#

o.O

subtle blade
#

I'm going to double check that

fair abyss
#

i can try

#

java 1.3 says true

#

8 says true

#

13 says true

keen compass
#

ah well then I guess the compiler saves the day on that one

#

lol

subtle blade
#

Just not sure if that holds true for a returned value

fair abyss
#

tried

#

that

#

xD

subtle blade
#

-0 is a literal

fair abyss
#

System.out.println(lel() == 0);

#

private int lel() { return -0; }

subtle blade
#

That's still a literal. Would have to be some operation

keen compass
#

return the value and then compare the value

fair abyss
#
            System.out.println(lel == 0);
#

like this?

#

still true

#

java 1.3

subtle blade
pastel condor
#

is this a good way to make a player faster? passenger.setVelocity(passenger.getVelocity().multiply(/*speed*/2));

keen compass
#

also, is the -0 == 0 also true for floating points and doubles?

fair abyss
#

int lel = lel(); System.out.println(Integer.compare(lel, 0));java 7

says 0 whic is same as equal

keen compass
#

because I am fairly certain yaw is a double if I remember right

#

or a float one of the two

pastel condor
#

float

fair abyss
#

still true.

#

used float

keen compass
#

interesting, I can't seem to find any information on it for java. Only other languages where you have to do that check yourself XD

fair abyss
#

used double

#

still true

#

maybe about "jvm"

#

that converst all code to fucking ununderstandable thing

keen compass
#

bytecode isn't completely not understandable lol

fair abyss
#

yeah I know some of you can understand, but nobody can easly read it as normal

keen compass
#

can be ambiguous if generics are used though

fair abyss
#

mentioned that,

#

some can understand basic things

#

I can understand too

#

but not very much

#

then

#

here you go

#

false

#

@keen compass @subtle blade

#
        try {
            double lel = lel();
            System.out.println(lel == 0.1);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private double lel() {
        return -0.1;
    }```
#

wait

#

cus

#

its really false

#

damn

#

ah my brain

#

dont see try i was writing another code, removed due to trying with java 1.3

subtle blade
#

Well, yea. -0.1 isn't 0.1. We'd have issues if that were the case ;p

fair abyss
#

๐Ÿ˜…

dusty topaz
#
    public void addBoost(BoostType type, int time) {
        Boost boost = activeBoosts.getOrDefault(type, new Boost(this.uuid, type));
        if (!boost.isActive()) {
            boost.activate(time * 20);
        } else {
            boost.extend(time * 20);
        }
        activeBoosts.put(type, boost);
    }
#

is there a nicer way to do this

#

is there some sort of getOrPut that will return the put value or the retrieved value, lol

fair abyss
#

you can get(xx).activate();

#

if doesn't contain or how you want

keen compass
#

ok, so I learned more on the -0 and 0 problem

dusty topaz
#

@fair abyss no

#

if it doesn't contain, i need to add it

#

just the put isn't necessary if it already contains

keen compass
#

Java implements that they are equal, however if you do arithmetic on 0 and its negative, well you end up with negative numbers and vice versas. So if you don't want negative you should check if the the 0 is negative first lol

tardy lance
#

Im getting frustrated...

keen compass
#

so, that means when messing with Yaw, you can end up checking if its 0 only for it to be -0 and do the wrong kind of math on it

tardy lance
#

It wont let me open methods outsite of the PlayerJoinEvent..

#

Also if its empty

keen compass
#

So that means you might still have to abs(0) XD

fair abyss
#

is it due to "fukcing minecraft's code"

#

huh? dont think so.

keen compass
#

no

#

Its due to positive infinity and negative infinity

tardy lance
#

nah i think @fair abyss has a point there

keen compass
#

So while although Java knows that -0 and 0 are equal to each other, what it doesn't know is which infinity you want and therefore will not turn -0 into 0 for you

#

so most of the time not an issue, but can be in MC though

fair abyss
#

@tardy lance ?

tardy lance
#

is it due to "fukcing minecraft's code"
@fair abyss

fair abyss
#

no

#

i was talking

keen compass
#

For example you want an entity to turn right if it is 0, but since it is -0 and you do your math operations the entity will instead turn left

fair abyss
#

we was started this from minecraf's fucking code

#

and we are here

#

it's not minecraft's problem

keen compass
#

in a way it is

fair abyss
#

i dont mean that

keen compass
#

because they implement negative values for yaw

#

which it should just be positive values instead XD

tardy lance
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

keen compass
#

and that would remove any discrepancy in which way you want an entity to turn

fair abyss
#

but it'sn minecraf's fault

tardy lance
#

It doesn't make sense !

keen compass
#

I know math is hard sometimes ๐Ÿ˜ฆ

fair abyss
#

maybe using 0 and 360 caused a problem
so they used 180 and -180

tardy lance
#

It is java that is hard sometimes

#

c# is bae

keen compass
#

the yaw is implemented based on 360, however though depending which way you turn though those values are negative instead as opposed to positive

fair abyss
#

so

subtle blade
#

It subtracts 180, basically lol

fair abyss
#

@subtle blade just add spigot api to return is at abs

subtle blade
#

Nah. Breaks compat

fair abyss
#

i mean if -0

keen compass
#

would have to do the same for -360 and -180 lol

subtle blade
#

Yea, floating point precision isn't always fun to work with

tardy lance
#

yay online class in 7h

#

and i didnt slept yet

keen compass
#

you only need 4hours to sleep anyways ๐Ÿ˜›

#

at least to stay functional for the most part

fair abyss
keen compass
#

you must be on the otherside of the world from me

fair abyss
#

๐Ÿ˜„

keen compass
#

you are 10 hours ahead, so I will say you are somewhere like in Germany or UK area

fair abyss
#

meh no

#

turkey

tardy lance
#

me germany ๐Ÿ˜„

keen compass
#

I was close XD

fair abyss
#

i still dont know whers germany

tardy lance
#

and wow what an english performance ive done there

fair abyss
#

I was left from geography in school

tardy lance
#

wow

#

big oof

fair abyss
#

I learned that germany isn't just near the turkey when Im 18

subtle blade
#

Just south of the UK

#

Eh, south east

tardy lance
#

How can i read THICC errors?

fair abyss
#

thicc?

tardy lance
#

yes thicc

#

big thicc oof

subtle blade
#

You really only need the "caused by" part

keen compass
#

you are probably a 1k miles from Germany roughly estimating

fair abyss
#

whats "thicc"?

tardy lance
#

new errors, new fustrations

subtle blade
#
Caused by: java.lang.NullPointerException
        at de.verilyzed.events.JoinEvent.onJoin(JoinEvent.java:23) ~[?:?]```
#

That's the important bit

tardy lance
#

Thicc is thick

fair abyss
#

do you know, i dont know whats miles ๐Ÿ˜„

keen compass
#

Ah right

subtle blade
#

NPE on line 23 of JoinEvent in the onJoin() method

keen compass
#

I have to convert to kilometers and meters

fair abyss
#

@subtle blade stop

#

theres WIKI for this

subtle blade
#

?stacktrace

#

?stacktraces

#

Surely there's a command for it

keen compass
#

1609KM from germany @fair abyss

tardy lance
#

on line 23:
fm.createUserSave(uuid);

I knew that this is the error, but i dont know WHY

fair abyss
#

hm cant understand 1600km whic far

keen compass
#

that is roughly estimating

tardy lance
#

it is because i called a function outside of the PlayerJoinEvent but WHY TF IT DOESNT WORK

fair abyss
#

nope

#

cus your fm is null

#

@tardy lance just I told you, use map

tardy lance
#

i am using maps know ๐Ÿ˜„

fair abyss
#

really?

#

so you shouldn't have file

#

at that point

#

fm isn't filemanager?

tardy lance
#

yeah it is called filemanager but no file

#

yk?

#

๐Ÿ˜‚

#

it is for the map stuff

fair abyss
#

@tardy lance send code

tardy lance
#

ohhhh boooyyyyy

#

you are a god

#

and i am a noob

#

fixed it ๐Ÿ˜„

fair abyss
#

really? .P

#

happy for you

tardy lance
#

it was null 5head

keen compass
#

thought I already specified the problem earlier

#

o.O

tardy lance
#

hm

#

thanks for that i think

keen compass
#

Well you have it fixed now so that is what matters ๐Ÿ˜›

tardy lance
#

i like this type of late night chat/talk โ˜•

fair abyss
#

me too

#

actually ist morning here xd

keen compass
#

stay here long enough and you will learn stuff you didn't think you would learn about ๐Ÿ˜„

fair abyss
#

^^

#

#general

#

we can continue chat there

pastel condor
#

(I asked this question earlier but though I would ask again) is this a good way to make a player faster? passenger.setVelocity(passenger.getVelocity().multiply(/*speed*/2));

fair abyss
#

no

#

Entity's have a speed

#

you can set that

pastel condor
#

how do I get and change them?

#

entity.getSpeed?

fair abyss
#

probably yes

pastel condor
#

but it's not a method?

fair abyss
#

maybe its living entity

pastel condor
#

it is

fair abyss
#

looks like

#

its moved

#

in newer versions

#

take a look at GENERIC_MOVEMENT_SPEED

pastel condor
#

okay thanks

#

how would I set it though?

fair abyss
#

LivingEntity implements Attributable

pastel condor
#

oh okay

#

didn't see that

fair abyss
#

mee to

#

im sure

#

there was

#

but dont know where moved

pastel condor
#

oh okay

#

I want to somehow make a players speed faster when they are on a vehicle

fair abyss
#

you can change player's speed with setWalkSpeed

#

but probably you should change minecart's speed

pastel condor
#

oh I see

#

then I have to make the entity mountable

#

never mind I'll just use armorstandEntity.addPassenger(player);

dry kiln
#

Can you send a custom toast?

#

easily?

rain plank
#

Anyone know how to let ops be on /baltop?

marsh hawk
#

pretty sure you can just remove essentials.balancetop.exclude from those ranks

frigid ember
#

How long generally does it take for a new premium resource to be approved?

keen compass
#

depends on how many resource staff are on but generally it shouldn't take too long in most cases. Give it like 2-3 days maybe a bit longer @frigid ember

frigid ember
#

okay, sweet ๐Ÿ™‚

#

Thanks!

marsh hawk
#

Anyone know how to get dynmap on ssl/https

rain plank
#

I've tried to remove it, but it doesn't work.

#

I saw it in the config file somewhere, just can't remember where.

keen compass
#

Would most likely need to use a proxy from nginx or apache to get https

#

would be easier to just serve the content directly though and more optimal instead of having dynmap host a mini webserver

red zenith
#

Is it possible to have dynmap push it's output?
How else would one handle that situation, when they're not using a dedicated server? Via a Database?

keen compass
#

not entirely sure

#

you get limited options if you go with a VPS provider that limits what you can do on said vps

oak stump
frigid ember
#

Hey, is it possible to give attribute ex: 154:84 84 to block(or item) with id 154 in 1.13 or latest versions ? As i know item ids removed in 1.13...

odd birch
#

Anyone knows how can I get IChatBaseComponent from string?

hoary parcel
#

lemme copy paste what I wrote at paper

#

if you just care about a raw string with no formatting, you can do new net.minecraft.server.ChatComponentText("Hi")
else, if you use the legacy chat format, you want to use CraftChatMessage.fromString(ChatColor.RED + "Hi")
if you use spigots component lib, you use
String json = net.md_5.bungee.chat.ComponentSerializer.toString(yourSpigotComponent);
IChatBaseComponent component = net.minecraft.server.ChatBaseComponent.ChatSerializer.jsonToComponent(json);

mighty topaz
fleet crane
#

[06:58:34] [Spigot Watchdog Thread/ERROR]: me.badbones69.crazycrates.cratetypes.QuadCrate.onLeave(QuadCrate.java:149)

oak stump
#

Yo @fleet crane u know y this wonโ€™t work??

wtf is wrong

Oh yeah plugin.yml

version: 2.7.0
name: SpectrumEnchants
author: TheDdosDevil

commands:
  book:
    description: to lazy to do one```

This is becoming really stupid xD

@oak stump

brisk mango
#

what doesnt exactly work

oak stump
#

Every time I try execute the command /book, it says it doesnโ€™t exist, but there is nothing wrong soo

brisk mango
#

errors?

#

just check if it doesnt exist there should be

#

or, send the command class and main

oak stump
#

But itโ€™s registered and the code is perfectly fine

vernal spruce
#

Where is the usage: /book field in plugin.yml?

oak stump
#

Not needed lol

frigid ember
#

That may be your error

brisk mango
#

there doesnt need to be a usage

#

if it doesnt work then its not fine @oak stump

#

just send the classes

oak stump
#

I might have found it

#

Lemme check

fleet crane
#

make sure you return true not false

oak stump
#

Ye, and I havenโ€™t registered the GUI so that might be why

brisk mango
#

@fleet crane bruh that doesnt matter even if you do return false/true

#

the command should work

oak stump
#

It reads the code down so it does sometimes

brisk mango
#

im just saying that it shouldnt say its an unknown command, but what can i do when you didnt provide enough info

#

show me the command class and main class

oak stump
#

THEY R THERE

brisk mango
#

Every time I try execute the command /book, it says it doesnโ€™t exist, but there is nothing wrong soo

brisk mango
#

I havent seen that

#

you could've just said

oak stump
#

Sorry

brisk mango
#

BookCommand:java 21

#

why did u say there is nothing wrong then?

#

youre confusing

odd birch
brisk mango
#

plugin.getCommand("book").setExecutor(this);

vernal spruce
#

oh boy "Main"?

brisk mango
#

Ofc, I've said a thousand times that you should never call any methods from a constructor

vernal spruce
#

try as he said

brisk mango
#

i've even explained it to you iirc

vernal spruce
#

registering the command in onenable

brisk mango
#

why is there a reason to call methods in the constructor

#

for the 1001th time, the constructor is used for constructing objects and not doing any work

oak stump
#

Lol I have registered in on enable before and doesnโ€™t work

brisk mango
#

"doesnt work"

vernal spruce
#

then most likely

#

ur plugin.yml

#

has a wrong format

#

even 1 " " can change something

brisk mango
#

if it throws a NPE in that line if u try it in onEnable() then your plugin.yml is fucked

oak stump
#

Yep still does

brisk mango
#

also, do you not know how to use anything other than static?

#

i see only static methods

#

everywhere

vernal spruce
#

delete the plugin yml and create it from scratch

#

this is confusing because we usually dont have problems with commands

oak stump
#

Exactly

vernal spruce
#

also not the best name for ur main class..

oak stump
#

Ye I know

#

Not my code

brisk mango
#

teach me why it is wrong to call ur main class Main

#

@vernal spruce

vernal spruce
#

somehow the server gets code from multiple classes with same name

oak stump
#

Sometimes u get errors if itโ€™s main but not sure why

#

Ye

brisk mango
#

but they have different package names so it wont matter.

#

u never get errors

#

only if the package name is same in every plugin

#

and the class name too

vernal spruce
#

i noticed some times that its getting method from another plugin somehow

brisk mango
#

huh

oak stump
#

Then u have used it for ur build path or something

vernal spruce
#

not rly was independent

#

i usually dont create stuff with 3rd party..

#

excluding hologramsapi

brisk mango
#

Calling it Main is fine

vernal spruce
#

cause meh..

frigid venture
#

You should. Saves time

oak stump
#

IT WORKS

chilly cairn
#

I have iron golem farm on latest spigot and villagers just randomly teleport out of their places, any ideas why?

brisk mango
#

Whatever. Can you now remove the method calls from every constructor?

oak stump
#

I deleted and remade plugin.yml

#

Whatever. Can you now remove the method calls from every constructor?
@brisk mango not my code, the kid doesnโ€™t like it like that, I told him it was better in onEnable

brisk mango
#

Any plugins @chilly cairn

#

well i mean youre the kid

chilly cairn
#

Yes i have coreprotect

brisk mango
#

you said you are 12 and you are fully able to develop in java and keep them in a constructor

#

thats really good

#

and thats a really good attitude to do things the way you like just because you like it in java

wraith thicket
#

Again with your "Caling it Main is fine" @brisk mango
Why don't you call your other classes Class1 and Class2 then? It's exactly the same.

brisk mango
#

@wraith thicket im not gonna argue with you

#

youre waste of time

wraith thicket
#

Lol

brisk mango
#

no point

oak stump
#

Dayum

chilly cairn
#

And dynmap

wraith thicket
#

No arguments -> insult. Nice

brisk mango
#

more like that you have no point

wraith thicket
#

I do have a point.

brisk mango
#

its just a fucking class name

#

what is the point

wraith thicket
#

It's that a class name should describe its responsibilities.

brisk mango
#

what is gonna change if im gonna call my main class name after my plugin name?

wraith thicket
#

I've told you this before.

brisk mango
#

its not neccessary if its your plugin

#

thats not a proper reason

#

stop arguing

#

youre actually quite annoying

wraith thicket
#

It's just as proper a reason to call your command handler class HelpCommand instead of Command1

brisk mango
#

Main class is an exception

wraith thicket
#

It improves readability, maintainability..

#

It's not.

brisk mango
#

Main improves my readability enough

wraith thicket
#

It's just one random part.

brisk mango
#

because I just know its Main

#

maintainability

wraith thicket
#

It's not the main access to the JVM though

brisk mango
#

well what are you saying right now doesnt make any sense

#

can you just leave

#

youre not helping anyone in this channel

wraith thicket
#

Just because you don't understand it, doesn't mean it doesn't make sense.

brisk mango
#

you can ask better developers than you are; everyone

#

they could tell you that there is nothing wrong calling it Main

#

and its just really matter of preference

wraith thicket
#

There's plenty of better developers on this discord. You're right.

brisk mango
#

not sure if on this discord

#

bye

chilly cairn
#

I need to fix that iron farm, and i simply cannot go vanilla.

brisk mango
#

no idea @chilly cairn , try removing the plugins

#

and see if it works

chilly cairn
#

But it worked before spigot update

#

And i not touched plugins

brisk mango
#

then it might be a spigot issue

#

cant help with that

frigid ember
#

is there someway i can get a color from a config file?

chilly cairn
#

what config file

frigid ember
#

yml

#

cant i do getConfig().getColor?

tardy lance
#

is there a way to let a entity for example horse despawn?

brisk mango
#

set its health to 0?

tardy lance
#

but will it drop his items the horse?

#

or leather

frigid ember
#

cant you use the EntitySpawnEvent check the "Entity" and if its a horse cant you just set the event to cancelledd?

tardy lance
#

i want a horse do disappear when i log out. the horse entity i saved in a map. now i want to get this maps horse and "kill" or despawn it

bronze marten
#

If you want the items, damage the entity (LivingEntity), if you want it gone, just do .remove()

arctic hound
#
[10:56:02 ERROR]: [VehiclePlugin] Unhandled exception occured in onPacketReceiving(PacketEvent) for VehiclePlugin
java.lang.NullPointerException: null
at de.leitung.classes.AbstractConfiguration.getString(AbstractConfiguration.java:104) ~[?:?]
at de.leitung.classes.VehicleListener.onPacketReceiving(VehicleListener.java:123) ~[?:?] [10:56:02 ERROR]: Parameters:
net.minecraft.server.v1_12_R1.PacketPlayInSteerVehicle@7a1a5dac[
a=0.0
b=0.98
c=false
d=false
] 

104->     @Override
    public String getString(String key) {
        return root.get(key).getAsString();
    }
123-> JsonConfiguration config = new JsonMaker(player.getVehicle().getCustomName());
                     config.init();
                     config.load(); 
                    UUID uuid = UUID.fromString(config.getString("Car")); <- Error is in the UUID
 
``` Can someone help me why I get an error message in the console
frigid ember
#

config could be null

#
        for (String s : HubCore.getInstance().getConfig().getConfigurationSection("ranks").getKeys(false)) {
            String path = "ranks." + s;
            if (player.hasPermission(HubCore.getInstance().getConfig().getString(path + ".aperm"))) {
                return HubCore.getInstance().getConfig().getColor(path + ".color");
            }
        }
        return null;
    }``` how come this always come back null even if the player has the perm?
keen compass
#

@frigid ember could be because you return null

frigid ember
#

it was because how i had color in the config

lament wolf
#

Hello, when I do:

#
        TextComponent component = new TextComponent(proxiedPlayer.getDisplayName());
        component.setColor(ChatColor.DARK_GRAY);
        component.setBold(true);

        TextComponent component1 = new TextComponent(" > ");
        component1.setColor(ChatColor.GOLD);

        TextComponent component2 = new TextComponent(target.getDisplayName());
        component2.setColor(ChatColor.DARK_GRAY);

        TextComponent component3 = new TextComponent(" : ");
        component3.setColor(ChatColor.GOLD);
        component3.setBold(true);

        TextComponent component4 = new TextComponent(message.toString());
        component4.setColor(ChatColor.GRAY);
        component4.setBold(false);

        component3.addExtra(component4);
        component2.addExtra(component3);
        component1.addExtra(component2);
        component.addExtra(component1);


        target.sendMessage(component);```
component just contain nothing
tiny dagger
#

wasn't it concat

lament wolf
#

no

hoary parcel
#

just use the component builder?

lament wolf
#

?

hoary parcel
#

or just target.sendMessage(component, component1, component2, component3, component4)

lament wolf
#

Ohw i didn't that

#

ty

frigid ember
#

how would i hide everyone online to a player

tiny dagger
#

Player#hidePlayer

frigid ember
#

with a forloop?

tiny dagger
#

yeah

frigid ember
#

what would i do if someone joins?

tiny dagger
#

you hide him at playerjoin

frigid ember
#

but how would i know who to hide him to? should i put people in a hash?

tiny dagger
#

probabily

ashen stirrup
#

Regarding hidePlayers, how do you remove from it?

tiny dagger
#

showPlayer

ashen stirrup
#

Oh

#

๐Ÿ˜‚

tardy lance
#

does someone has an idea how i can modify a horse ?
So skin, velocity and jumpheight

subtle blade
#

(it inheriting a few methods from AbstractHorse as well)

tardy lance
#

thanks

tardy lance
#

Is there something to spawn a preset horse?

I stored all information in a variable called horse (Horse horse;)
I can remove it my doing horse.remove();

but how can i spawn it? horse.spawn() does not exist

solid plume
#

How can i remove some enchantments

#

like frost walker

subtle blade
#

Last three questions have been answered just by links to Javadocs. Please browse first

tardy lance
ashen stirrup
#

Try spawnEntity

tardy lance
#

doesnt work either

#

it wants a type and not that complete horse structure

wraith thicket
#

@tardy lance That's obvious. You cannot "respawn" an entity. You need to create a new one.
Since you wanted to set its parameters, I linked to the method that also has the consumer argument that you can use the change its "presets".

tardy lance
#

but it also wont work with a preset?

#

so i got one that is saved in a hashmap

wraith thicket
#

It won't "magically" know what "presets" you want

#

But you can easily just set them.

tardy lance
#

oh okay

dusty topaz
#

What is the best way to get a time input from a user (ie 4d3h2m1s) and then format it down into ms?

solid plume
#

i dont know .class file editting . How can i remove some enchantments

rocky rose
#

have someone a trees cutting plugging that works on 1.15.2

#

?

#

@everyone

wraith thicket
#

You don't need a plugin to cut down trees. Just use an axe.

#

What are you actually looking for? Something that cuts the whole tree at once?

subtle blade
#

I know some people use my VeinMiner plugin for that, though it's not tailored to trees

hollow thorn
#

how do i store items in stone

#

or ChestMeta in stone

subtle blade
#

None of that made any sense

idle zodiac
#

How would I go about checking for a vault balance update?

hollow thorn
#

store items in a block

#

that is a stone block

#

so it cant be xrayed

subtle blade
#

Orebfuscator does this. It hides ores to the client

hollow thorn
#

so can i make a special chest

#

that is a stone block you click

#

to get items

#

so i could make a factions server

#

wherre x-ray is punished by a police force

hoary parcel
#

Orebutscator, now that's a name I haven't heard in years

hollow thorn
#

instead of a banner

hoary parcel
#

Is that even still a thing?

hollow thorn
#

i think sorb used it once

tawdry venture
#

the player#gettargetblock always returns something?

silk bane
#

it's still maintained

hollow thorn
#

but then removed it because of lag

hoary parcel
#

I thought ppl stopped using that after the more native solutions poped up

silk bane
#

and it's been updated to 1.15

hoary parcel
#

Cause you can't beat the performance or stonars impl in the fork that shall not be named

idle zodiac
#

nvm found i

hollow thorn
#

and also it makes redstone ore realy glitchy if you build up with it to use your super fortune

hoary parcel
#

Shouldn't it only touch invisible ores?

tiny dagger
#

yeah

#

but it did more than that

#

it could hide caves

#

and much more

#

tho that wouldn't be as necessary if you're looking for a simple resource system

brisk mango
#

@subtle blade i think orebfuscator has some issues tho

subtle blade
#

You're going to struggle to find anything that doesn't have issues

brisk mango
#

youre right

hoary parcel
#

Papers impl is pretty flawless

#

But doesn't offer stuff like chest hider or cave hider

#

It's simple and effective

boreal eagle
#

is there ever going to be 1.8 support again

brisk mango
#

no

#

never

boreal eagle
#

the community is still big in 1.8

brisk mango
#

no

hoary parcel
#

No it's not, lol

#

The fast majority is on 1.15

#

Just let it die

boreal eagle
#

1.15 takes up a lot of ram

brisk mango
#

= code your own server jar

#

and then you have good 1.8 version

#

you can fix bugs yourself

boreal eagle
#

hmm

obtuse rose
#

@subtle blade how do I update my name, Isn't it suppose to auto update periodically? It has been 3 days, is that normal?

subtle blade
#

If I recall correctly, it updates on a regular period. i.e. every Saturday or something. Honestly I can just update it manually though. But really, it's an aesthetic change

#

What's your account?

obtuse rose
subtle blade
#

That's the one

hollow thorn
#

can someone tell me how

#

to store data in a stone block

tiny dagger
#

persistent container

obtuse rose
#

Thanks Choco, I thought it suppose to update every day or something, sorry for bothering you ๐Ÿ˜…

subtle blade
#

npnp

dusty topaz
#
                int newTime = boost.isPermanent() ? -1 : boost.calculateNewTime();
                database.executeStatement("insert into boosts (uuid, type, time) values (?, ?, ?)",
                        player.getUniqueId().toString(),
                        boost.getType().getId(), // is an integer
                        newTime);
#

[15:00:22 WARN]: java.sql.SQLException: Invalid utf8 character string: 'ACED00'

#

I don't know what an ACED00 is and I don't know what to D0

silk bane
#

what's executeStatement ๐Ÿค”

tiny dagger
#

how would that work tho

#

oh

dusty topaz
#

it just calls the statement

#

async

#

the prepared statement is gotten like:

    private PreparedStatement getPreparedStatement(Connection connection, String query, Object... parameters) throws SQLException {
        PreparedStatement statement = connection.prepareStatement(query);

        for(int i = 0; i < parameters.length; ++i) {
            statement.setObject(i + 1, parameters[i]);
        }

        return statement;
    }
#

works fine for everything else, has worked fine for insertions and table creation before

#

never ran into this

#

i suppose i might have to look at the full contents of the query?

#

HikariProxyPreparedStatement@166967155 wrapping com.mysql.jdbc.JDBC4PreparedStatement@106fe58e: delete from boosts where uuid = ** STREAM DATA **
๐Ÿ™ƒ

silk bane
#

blame executeStatement

dusty topaz
#

i wrote execute statement

#

๐Ÿ˜ฆ

silk bane
#

idk if setobject is guaranteed to work for any object type

dusty topaz
#

has worked fine elsewhere so i assumed it was

#

such as here:

        database.executeStatement("insert into shards (uuid, name, balance) values (?, ?, ?) on duplicate key update name = ?, balance = ?;",
                player.getUniqueId().toString(),
                player.getName(),
                balance,
                player.getName(),
                balance);
#

that is strings and ints also, so i'm unsure why it would suddenly break

silk bane
#

where's the call to delete from

#

you've posted two insert intos

#

did you miss out a toString or smth?

dusty topaz
#

oh hell, right

#

ahhhhhh

#

yeppp

silk bane
#

moral of the story is to use preparedstatement directly ๐Ÿ˜‚๐Ÿ˜‚

dusty topaz
#

My way is much nicer

#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

silk bane
#

yes but java will tell you when you setString a UUID

#

rather than having mysql do its thing

dusty topaz
#

meh, would just be better if i could read the stack trace properly

#

and stop assuming the culprit

#

i think it's a worth tradeoff as opposed to having a massive prepared statement definition every time you access sql

brisk mango
#

@silk bane have you tried making an AI anticheat?

silk bane
#

nope, cba

brisk mango
#

i mean that is actually quite hard

keen compass
#

especially if you have no data to start with

dusty topaz
#

hardest part would probably be getting the training data lol

#

yea

brisk mango
#

yeah you need to watchout for many things

#

like if there is no data etc

keen compass
#

And then if there is data, that data set is going to be quite large to be effective XD

brisk mango
#

i mean to begin with, it could be enough saving every hit distance to a set and then making a diameter

#

bruh that thing would take a ton of brains lol

#

but i think there is an AC that is based on machine learning

frigid ember
#

whats a string

wheat peak
#

Staff whatโ€™s a string?

wanton delta
#

String

frigid ember
#

hello do you know why all time in the night the monsters come like in 10

#

?

#

like

#

lots of monsters

sturdy oar
#

A string is an array of characters smh

frigid ember
#

me @sturdy oar ?

sturdy oar
#

does it look like that's the answer to your question

frigid ember
#

not that

#

but maybe

brisk mango
#

@sturdy oar haha no its not

#

a string is a string

#

ยฏ_(ใƒ„)_/ยฏ

#

maybe because of your server difficulty @frigid ember

#

anyway you should read the messages before replying to them

frigid ember
#

@brisk mango difficulty is hard on my server

#

but never had that much monsters in one minecraft night

brisk mango
#

then thats why??

#

like idk why ask so stupid question

frigid ember
#

i NEVER HAD THAT MUCH monsters even when my difficulty been hard

brisk mango
#

well thats just minecraft

wraith thicket
#

People ask a question because they don't know the answer to said question.
If you don't want to answer, then don't. But there's really no reason to start insulting people.

sturdy oar
#

wdym "no it's not"

brisk mango
#

oh no this guy again

#

wait really? how i am insulting people with saying that they asked a stupid question

wraith thicket
#

You're implying they're stupid. I'm fairly certain you know that.

brisk mango
#

๐Ÿคฆโ€โ™‚๏ธ

#

saying that someone has a stupid question doesnt mean calling them stupid

#

bruh imma just block you you are really annoying

wraith thicket
#

Read what you said and then think again.

brisk mango
#

you really dont have common sense

wraith thicket
#

Perhaps. But at least I have manners.

brisk mango
#

tell me how is it saying to someone that they have a dumb question saying theyre stupid? its not

#

no, you dont have anything lol

brisk mango
#

it is?

sturdy oar
#

I think it is

frigid ember
#

all my server (15) says that its not

subtle blade
#

Zombie tracking distance is in the range of 40 or so blocks and on hard mode they can spawn reinforcements when damaged

sturdy oar
#

zombie swarms were a new feature i think

subtle blade
#

It is normal

frigid ember
#

idk

subtle blade
#

If you would like, you can reduce the spawn limit from the default 70 for hostile creatures to something lower, but this is normal behaviour

brisk mango
#

its normal on hard difficulty

frigid ember
#

i can make XP farm of it Xd

subtle blade
#

Besides - there is a sweep attack that can damage multiple monsters. It was added specifically because of the amount of zombies that can spawn on a player

sturdy oar
#

and that's why you don't bring back 1.8 pvp mechanics

frigid ember
#

ok

subtle blade
#

As if they're difficult to deal with anyways. Jump and crit hit. 2 hits with a diamond sword and they're dead

#

Move backwards slightly while you're jumping and you remain unharmed

ancient ridge
#

choco pve pro

subtle blade
#

Well that's the thing. It's literally not difficult whatsoever to adapt to the new combat system

#

People are just babies and won't adapt

sturdy oar
#

1.7.10 - 1.8 pvp servers ๐Ÿคฎ

hallow surge
#

shush

#

why does my config delete all edits made after a server reload this is my code

public void onDisable() {
        getServer().getConsoleSender().sendMessage(ChatColor.RED + "Notice Y2K_'s Printer Plugin has been disabled");
        saveConfig();
    }
    public void loadConfig() {
        getConfig().options().copyDefaults(true);
        saveDefaultConfig();
    }```
sturdy oar
#

don't reload the server

strong zinc
#

who has economy based on an item currency

#

i need some help bruh