diff --git a/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/package-info.java b/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/package-info.java index ccc1809d..5de8656c 100644 --- a/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/package-info.java +++ b/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/time/monotonic/package-info.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * Provides monotonic clocks. [Taken from NC4 Planning/Framework.] * @author mc_dev diff --git a/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/map/CoordHash.java b/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/map/CoordHash.java index 7bae855a..7748975b 100644 --- a/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/map/CoordHash.java +++ b/NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/map/CoordHash.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.utilities.ds.map; public class CoordHash { diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/types/CommandActionWithColor.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/types/CommandActionWithColor.java index 0289ebdb..7e2d9c33 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/types/CommandActionWithColor.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/actions/types/CommandActionWithColor.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.actions.types; import fr.neatmonster.nocheatplus.actions.AbstractActionList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/IRemoveSubCheckData.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/IRemoveSubCheckData.java index ead7a9e0..46e2fd8a 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/IRemoveSubCheckData.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/access/IRemoveSubCheckData.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.access; import fr.neatmonster.nocheatplus.checks.CheckType; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/generic/block/AbstractBlockDirectionCheck.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/generic/block/AbstractBlockDirectionCheck.java index 1307ff52..07184d29 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/generic/block/AbstractBlockDirectionCheck.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/generic/block/AbstractBlockDirectionCheck.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.generic.block; import org.bukkit.Location; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/velocity/VelocityFlags.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/velocity/VelocityFlags.java index 543df423..db7fe0d5 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/velocity/VelocityFlags.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/velocity/VelocityFlags.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.moving.velocity; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueHandle.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueHandle.java index 679de250..24e26d39 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueHandle.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueHandle.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.net; import org.bukkit.entity.Player; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueLookBlockChecker.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueLookBlockChecker.java index 65ff0ed9..4b4018db 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueLookBlockChecker.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/FlyingQueueLookBlockChecker.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.net; import fr.neatmonster.nocheatplus.checks.net.model.DataPacketFlying; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/PacketFrequency.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/PacketFrequency.java index 4ca7e31f..18986669 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/PacketFrequency.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/net/PacketFrequency.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.checks.net; import org.bukkit.entity.Player; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/log/stream/StreamCommand.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/log/stream/StreamCommand.java index 5274fd07..c01ce9b8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/log/stream/StreamCommand.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/command/admin/log/stream/StreamCommand.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.command.admin.log.stream; import java.util.logging.Level; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/activation/ActivationUtil.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/activation/ActivationUtil.java index 9542556c..6eb6728e 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/activation/ActivationUtil.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/activation/ActivationUtil.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.activation; import fr.neatmonster.nocheatplus.components.registry.activation.Activation; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/AbstractBlockPropertiesPatch.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/AbstractBlockPropertiesPatch.java index 269e332b..3f8221e7 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/AbstractBlockPropertiesPatch.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/AbstractBlockPropertiesPatch.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks; import fr.neatmonster.nocheatplus.components.registry.activation.Activation; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/IPatchBlockPropertiesSetup.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/IPatchBlockPropertiesSetup.java index 665f05cf..88050bed 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/IPatchBlockPropertiesSetup.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/IPatchBlockPropertiesSetup.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks; import fr.neatmonster.nocheatplus.components.registry.activation.IDescriptiveActivation; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeListener.java index 5bd74ee6..7dd7c6ee 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeListener.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks.changetracker; import java.util.ArrayList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeReference.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeReference.java index ecda5441..a46c17d7 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeReference.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/BlockChangeReference.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks.changetracker; import fr.neatmonster.nocheatplus.compat.blocks.changetracker.BlockChangeTracker.BlockChangeEntry; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/OnGroundReference.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/OnGroundReference.java index 66223580..ed8fabe8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/OnGroundReference.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/changetracker/OnGroundReference.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks.changetracker; import java.util.LinkedList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_12.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_12.java index 1c102fbc..45d157da 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_12.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC1_12.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks.init.vanilla; import org.bukkit.Material; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java index 791e369a..11e8a69d 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/special/MultiClientProtocolBlockShapePatch.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.compat.blocks.init.vanilla.special; import java.util.LinkedList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/CheckTypeTree.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/CheckTypeTree.java index a997dacc..268c259d 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/CheckTypeTree.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/data/checktype/CheckTypeTree.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.data.checktype; import java.util.ArrayList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessVehicle.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessVehicle.java index 3788036d..1255fa26 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessVehicle.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/entity/IEntityAccessVehicle.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.entity; import java.util.List; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox2D.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox2D.java index ba31e1bd..3fad6e74 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox2D.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox2D.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.location; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox3D.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox3D.java index cb90a412..ff78f36c 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox3D.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/location/IGetBox3D.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.location; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/exception/AlreadyRegisteredException.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/exception/AlreadyRegisteredException.java index 00766021..d00554ea 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/exception/AlreadyRegisteredException.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/exception/AlreadyRegisteredException.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.exception; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IGetRegistrationOrder.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IGetRegistrationOrder.java index 7752d1aa..7216954f 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IGetRegistrationOrder.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IGetRegistrationOrder.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.order; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IRegisterWithOrder.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IRegisterWithOrder.java index 8f1c036a..e5207a14 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IRegisterWithOrder.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/IRegisterWithOrder.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.order; public interface IRegisterWithOrder { diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrder.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrder.java index 70c03f47..00de5dcb 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrder.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrder.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.order; import java.lang.annotation.Documented; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrderStore.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrderStore.java index 2831ae9b..666c21d2 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrderStore.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/order/RegistrationOrderStore.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.order; import java.util.HashMap; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/store/RegisteredItemStore.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/store/RegisteredItemStore.java index daaf39de..33d51264 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/store/RegisteredItemStore.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/components/registry/store/RegisteredItemStore.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.components.registry.store; import java.util.ArrayList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/EventRegistryBukkit.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/EventRegistryBukkit.java index 12b9a109..35ced735 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/EventRegistryBukkit.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/EventRegistryBukkit.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; import java.lang.reflect.Method; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListener.java index b0973a86..d167ca4e 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListener.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; /** diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerNode.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerNode.java index 73be0fdf..0860d445 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerNode.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerNode.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; import java.util.ArrayList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerRegistry.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerRegistry.java index 14c47c4f..bfc076d7 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerRegistry.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerRegistry.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; import java.util.ArrayList; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerWithOrder.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerWithOrder.java index b698831a..95456e0b 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerWithOrder.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MiniListenerWithOrder.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; import fr.neatmonster.nocheatplus.components.registry.order.IGetRegistrationOrder; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MultiListenerRegistry.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MultiListenerRegistry.java index 0ab4ce22..2442f993 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MultiListenerRegistry.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/event/mini/MultiListenerRegistry.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.event.mini; import java.lang.reflect.InvocationTargetException; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/CheckTypeUtil.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/CheckTypeUtil.java index 937d7245..6c3ea5ab 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/CheckTypeUtil.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/CheckTypeUtil.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.utilities; import java.util.Collections; diff --git a/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestCheckTypeTree.java b/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestCheckTypeTree.java index b848797f..6e6ae822 100644 --- a/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestCheckTypeTree.java +++ b/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestCheckTypeTree.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.test; import static org.junit.Assert.fail; diff --git a/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestRegistrationOrder.java b/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestRegistrationOrder.java index ceda2b94..60209356 100644 --- a/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestRegistrationOrder.java +++ b/NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestRegistrationOrder.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ package fr.neatmonster.nocheatplus.test; import static org.junit.Assert.fail; diff --git a/add_gplv3_header.py b/add_gplv3_header.py new file mode 100644 index 00000000..882a88dd --- /dev/null +++ b/add_gplv3_header.py @@ -0,0 +1,118 @@ +# ~ coding: UTF-8 ~ +''' +- Find files that don't start with the GPLv3 header. +- As a secondary product, count files and size and lines. +- Add a GPLv3 header to each .java file where it may be missing. +@license: See #LICENSE below. +''' +from cgitb import text + +LICENSE = """/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */""" + +import sys +import os + +class ResultCollector: + + def __init__(self, lc_exts = (".java",), ignore_startswith = ()): + self.lc_exts = tuple(map(lambda x: x.lower(), lc_exts)) + self.max_len_inspect = max(map(len, ignore_startswith)) + 50 if ignore_startswith else 0 + self.ignore_startswith = tuple(map(self.transform_special, ignore_startswith)) + self.collected_files = [] + self.not_collected_files = 0 + self.lines_total = 0 + self.bytes_total = 0 + + def transform_special(self, s): + """ + Transform string for comparison in a special way. + """ + for remove in ("\r\n", "\n", "\r", " ", "\t"): + s = s.replace(remove, "") + return s + + def check_ignore_startswith(self, content): + """ + Return True if the content starts with any of the ignore_startswith parts. + """ + content = self.transform_special(content[:self.max_len_inspect]) + for ref in self.ignore_startswith: + if content.startswith(ref): + return True + return False + + def stats_str(self): + collected = len(self.collected_files) + return "collected=" + repr(collected) + " total_files=" + repr(collected + self.not_collected_files) + " total_lines=" + repr(self.lines_total) + " total_bytes=" + repr(self.bytes_total) + 806895 + + def collect_filename(self, fp): + """ + Only "collect" if the file doesn't start with 'ignore_startswith'. + """ + f = open(fp, "rb") + c = f.read().decode("UTF-8") # Assume UTF-8 sources. + f.close() + if self.check_ignore_startswith(c): + self.not_collected_files += 1 + else: + self.collected_files.append(fp) + self.bytes_total += len(c) + if c: + self.lines_total += 1 + c.count("\n") + + def collect_filenames(self, path): + """ + Recursively collect full paths of files with lower case extension in lc_exts, + not starting with ignore_startswith. + """ + items = os.listdir(path) + for item in items: + fp = os.path.join(path, item) + if os.path.islink(fp): + continue + if os.path.isfile(fp) and os.path.splitext(item)[1].lower() in self.lc_exts: + self.collect_filename(fp) + elif os.path.isdir(fp): + self.collect_filenames(fp) + +def main(): + path = os.path.abspath(os.path.normpath(os.path.split(sys.argv[0])[0])) + print("Working on path: " + path) + + items = os.listdir(path) + license = unicode(LICENSE) + files_java = ResultCollector(lc_exts = (".java",), ignore_startswith = (license,)) + for item in items: + fp = os.path.join(path, item) + if os.path.isdir(fp) and not os.path.islink(path) and item.startswith("NCP") or item == "NoCheatPlus": + files_java.collect_filenames(fp) + # TODO: Also collect other contained file types (pom.xml, ...). + print(".java: " + files_java.stats_str()) + print("Update license:") + for fp in files_java.collected_files: + rp = os.path.relpath(fp, path) + f = open(fp, "rb") + c = f.read().decode("UTF-8") + f.close() + c = license + "\n" + c + f = open(fp, "wb") + f.write(c) + f.close() + print(rp) + +if __name__ == "__main__": + main() \ No newline at end of file