Closed HimmelKreis4865 closed 3 years ago
Why should it make the API easier? All properties are public, so I don't see a reason for adding Getters for them. They are just some uneseccary methods for the Plot-class.
^^^ Just my personal opinion.
well, it can be your opinion yea but I think getters make the code look cleaner and make live easier for debugging or errror tracking.
Since Plot::isOwner()
is as useless as Plot::isDenied
and Plot::isHelper()
I don't think its a big argument for rejecting that. .-.
Now I removed every other "useless" method but still left Plot::isOwner()
in and fixed /plot setowner
subcommand which is showing the correct owner now
Introduction
This PR is adding some base API methods that should make PlotAPI easier
Relevant issues -
-->
Changes
API changes
Added
Plot::getOwner() :string
,Plot::getX() :int
,Plot::getZ() :int
,Plot::getLevelName() :string
,Plot::isOwner(string $username) :bool
Behavioural changes -
Backwards compatibility
Compatible
Follow-up -
Requires translations: -
-->
Tests
It was tested and worked for me so far